original_docstring: Creates and returns an instance of the model given its class name.
    
docstring: Creates and returns an instance of the model given its class name.
docstring_tokens: Creates and returns an instance of the model given its class name .
code: def load_model(name):
    '''Creates and returns an instance of the model given its class name.
    '''
    # Find the model class from its name
    all_models = get_models()
    mdict = {model.__name__: model for model in all_models}
    if name not in mdict:
      print('Invalid model index. Options are:')
      # Display a list of valid model names
      for model in all_models:
        print('\t* {}'.format(model.__name__))
      return None
    NetClass = mdict[name]
  
    return NetClass
code_tokens: def load_model ( name ) : all_models = get_models ( ) mdict = { model . __name__ : model for model in all_models } if name not in mdict : print ( 'Invalid model index. Options are:' ) for model in all_models : print ( '\t* {}' . format ( model . __name__ ) ) return None NetClass = mdict [ name ] return NetClass
short_docstring: Creates and returns an instance of the model given its class name.
short_docstring_tokens: Creates and returns an instance of the model given its class name .
comment: '''Creates and returns an instance of the model given its class name.
    '''$SEP$# Find the model class from its name$SEP$# Display a list of valid model names