def construct_dependency_statement(
    dependencies: Optional[list[str]] = None, environment_version: str = "None"
) -> str:
    """
    Constructs the dependency statement for the SQL function.

    Args:
        dependencies: An optional list of PyPI dependencies for the function to utilize in the execution environment
        environment_version: The version of the environment to use for the function. Defaults to "None".

    Returns:
        str: The constructed dependency statement.
    """
    if dependencies:
        dependencies_json = json.dumps(dependencies)
        return f"\nENVIRONMENT (dependencies = '{dependencies_json}', environment_version = '{environment_version}')"
    elif environment_version != "None":
        return f"\nENVIRONMENT (environment_version = '{environment_version}')"
    else:
        return ""

    Constructs the dependency statement for the SQL function.

    Args:
        dependencies: An optional list of PyPI dependencies for the function to utilize in the execution environment
        environment_version: The version of the environment to use for the function. Defaults to "None".

    Returns:
        str: The constructed dependency statement.
    
ai/core/src/unitycatalog/ai/core/utils/callable_utils.py