code: def get_model_cls_from_type(model_type: LGBMModelType):
      import lightgbm
  
      if not _model_type_to_model:
          _model_type_to_model.update(
              {
                  LGBMModelType.CLASSIFIER: lightgbm.LGBMClassifier,
                  LGBMModelType.REGRESSOR: lightgbm.LGBMRegressor,
                  LGBMModelType.RANKER: lightgbm.LGBMRanker,
              }
          )
      return _model_type_to_model[model_type]
  
imports: import enum
  import itertools
  from collections import namedtuple
  import numpy
  import pandas
  from ....dataframe import DataFrame, Series
  from ....tensor import tensor
label_desc: Use image node_id 1 for calling a global function with example usage: get_model_cls_from_type(model_type) and returns: _model_type_to_model