code: def run_inference(
      test_experiment,
      compute_target,
      script_folder,
      train_run,
      test_dataset,
      lookback_dataset,
      max_horizon,
      target_column_name,
      time_column_name,
      freq,
  ):
      model_base_name = "model.pkl"
      if "model_data_location" in train_run.properties:
          model_location = train_run.properties["model_data_location"]
          _, model_base_name = model_location.rsplit("/", 1)
      train_run.download_file(
          "outputs/{}".format(model_base_name),
          "inference/{}".format(model_base_name),
      )
  
      inference_env = train_run.get_environment()
  
      est = Estimator(
          source_directory=script_folder,
          entry_script="infer.py",
          script_params={
              "--max_horizon": max_horizon,
              "--target_column_name": target_column_name,
              "--time_column_name": time_column_name,
              "--frequency": freq,
              "--model_path": model_base_name,
          },
          inputs=[
              test_dataset.as_named_input("test_data"),
              lookback_dataset.as_named_input("lookback_data"),
          ],
          compute_target=compute_target,
          environment_definition=inference_env,
      )
  
      run = test_experiment.submit(
          est,
          tags={
              "training_run_id": train_run.id,
              "run_algorithm": train_run.properties["run_algorithm"],
              "valid_score": train_run.properties["score"],
              "primary_metric": train_run.properties["primary_metric"],
          },
      )
  
      run.log("run_algorithm", run.tags["run_algorithm"])
      return run
  
file_path: MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/forecasting-github-dau/helper.py
imports: import pandas
  from azureml.core import Environment
  from azureml.core.conda_dependencies import CondaDependencies
  from azureml.train.estimator import Estimator
  from azureml.core.run import Run
  from azureml.automl.core.shared import constants
label_desc: Use image node_id 4 for calling a global function with example usage: run_inference(test_experiment, compute_target, script_folder, train_run, test_dataset, lookback_dataset, max_horizon, target_column_name, time_column_name, freq) and returns: run