def create_function(
        self,
        *,
        sql_function_body: Optional[str] = None,
    ) -> "FunctionInfo":
        """
        Create a UC function with the given sql body or function info.

        Note: `databricks-connect` is required to use this function, make sure its version is 15.1.0 or above to use
            serverless compute.

        Args:
            sql_function_body: The sql body of the function. Defaults to None.
                It should follow the syntax of CREATE FUNCTION statement in Databricks.
                Ref: https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html#syntax

        Returns:
            FunctionInfo: The created function info.
        """
        if sql_function_body:
            self.set_spark_session()
            # TODO: add timeout
            self.spark.sql(sql_function_body)
            created_function_info = self.get_function(extract_function_name(sql_function_body))
            check_function_info(created_function_info)
            return created_function_info
        # TODO: support creating from function_info after CreateFunction bug is fixed in databricks-sdk
        # return self.client.functions.create(function_info)
        raise ValueError("sql_function_body must be provided.")

        Create a UC function with the given sql body or function info.

        Note: `databricks-connect` is required to use this function, make sure its version is 15.1.0 or above to use
            serverless compute.

        Args:
            sql_function_body: The sql body of the function. Defaults to None.
                It should follow the syntax of CREATE FUNCTION statement in Databricks.
                Ref: https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html#syntax

        Returns:
            FunctionInfo: The created function info.
        
ai/core/src/unitycatalog/ai/core/databricks.py