code: def model_selector(model_initializer):
      """Selects the appropriate Model class to use for `model_initializer`
  
      Parameters
      ----------
      model_initializer: callable
          The callable used to create an instance of some algorithm
  
      Returns
      -------
      :class:`Model`, or one of its children
  
      Examples
      --------
      >>> from sklearn.svm import SVC
      >>> model_selector(SVC) == Model
      True
      >>> model_selector(None) == Model
      True
      """
      try:
          if model_initializer.__name__ in (
              "KerasClassifier",
              "KerasRegressor",
          ):
              return KerasModel
          elif model_initializer.__name__ in (
              "XGBClassifier",
              "XGBRegressor",
          ):
              return XGBoostModel
          else:
              return Model
      except AttributeError:
          return Model
  
imports: from hyperparameter_hunter.sentinels import locate_sentinels
  from hyperparameter_hunter.settings import G
  from contextlib import suppress
  import inspect
  import sys
  import warnings
  import sklearn.utils
label_desc: Use image node_id 1 for calling a global function with example usage: model_selector(model_initializer) and returns: KerasModel, Model, XGBoostModel, Model