code: def import_from(module, name):
      '''
      usage example:
      grid = import_from('sklearn.model_selection', 'GridSearchCV')
      is equivalent to:
      from sklearn.model_selection import GridSearchV as grid
      '''
      module = importlib.import_module(module)
      return getattr(module, namef import_from(module, name):
      '''
      usage example:
      grid = import_from('sklearn.model_selection', 'GridSearchCV')
      is equivalent to:
      from sklearn.model_selection import GridSearchV as grid
      '''
      module = importlib.import_module(module)
      return getattr(module, name)
docs: usage example:
      grid = import_from('sklearn.model_selection', 'GridSearchCV')
      is equivalent to:
      from sklearn.model_selection import GridSearchV as grid