def METHOD_NAME(self, runspec: RunObject, execution):
    internal_code, original_handler = self.get_internal_parameters(runspec)
    if internal_code:
        task_parameters = runspec.spec.parameters.get("task_parameters", {})
        task_parameters["spark_app_code"] = internal_code
        if original_handler:
            task_parameters[
                "original_handler"
            ] = original_handler  # in order to handle reruns.
        runspec.spec.parameters["task_parameters"] = task_parameters
        current_file = os.path.abspath(__file__)
        current_dir = os.path.dirname(current_file)
        databricks_runtime_wrap_path = os.path.join(
            current_dir, "databricks_wrapper.py"
        )
        with open(
            databricks_runtime_wrap_path, "r"
        ) as databricks_runtime_wrap_file:
            wrap_code = databricks_runtime_wrap_file.read()
            wrap_code = b64encode(wrap_code.encode("utf-8")).decode("utf-8")
        self.spec.build.functionSourceCode = wrap_code
        runspec.spec.handler = "run_mlrun_databricks_job"
    else:
        raise ValueError("Databricks function must be provided with user code")