code: def forecaster_type_by_name(name: str) -> Forecaster:
      forecaster = pydoc.locate(name)
  
      ForecasterNotFound.guard(
          forecaster is not None,
          f'Cannot locate estimator with classname "{name}".',
      )
  
      return cast(Forecaster, forecaster)
  
file_path: gluonts/src/gluonts/shell/util.py
imports: import inspect
  import pydoc
  from typing import Type, Union, cast
  from toolz import keyfilter
  from gluonts.model.estimator import Estimator
  from gluonts.model.predictor import Predictor
  from .exceptions import ForecasterNotFound
label_desc: Use image node_id 1 for calling a global function with example usage: forecaster_type_by_name(name) and returns: cast