code: def get_model(model_path, model_file_name):
      # _, ext = os.path.splitext(model_path)
      model_full_path = os.path.join(model_path, model_file_name)
      print(model_full_path)
      if model_file_name.endswith("pt"):
          # Load the fc-tcn torch model.
          assert (
              _torch_present
          ), "Loading DNN models needs torch to be presented."
          if torch.cuda.is_available():
              map_location = map_location_cuda
          else:
              map_location = "cpu"
          with open(model_full_path, "rb") as fh:
              fitted_model = torch.load(fh, map_location=map_location)
      else:
          # Load the sklearn pipeline.
          fitted_model = joblib.load(model_full_path)
      return fitted_model
  
file_path: MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/forecasting-pipelines/scripts/infer.py
imports: import argparse
  from datetime import datetime
  import os
  import uuid
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  import joblib
  from sklearn.metrics import mean_absolute_error, mean_squared_error
  from azureml.data.dataset_factory import TabularDatasetFactory
  from azureml.automl.runtime.shared.score import scoring, constants
  import azureml.automl.core.shared.constants
  from azureml.core import Run, Dataset, Model
label_desc: Use image node_id 3 for calling a global function with example usage: get_model(model_path, model_file_name) and returns: fitted_model