class_docstr: Create the registry that will map name to object. This facilitates the users to create
      custom registry.
  
      Parameters
      ----------
      name
          The name of the registry
  
      Examples
      --------
  
      >>> from gluonnlp.utils.registry import Registry
      >>> # Create a registry
      >>> MODEL_REGISTRY = Registry('MODEL')
      >>>
      >>> # To register a class/function with decorator
      >>> @MODEL_REGISTRY.register()
  ...     class MyModel:
  ...         pass
      >>> @MODEL_REGISTRY.register()
  ...     def my_model():
  ...         return
      >>>
      >>> # To register a class object with decorator and provide nickname:
      >>> @MODEL_REGISTRY.register('test_class')
  ...     class MyModelWithNickName:
  ...         pass
      >>> @MODEL_REGISTRY.register('test_function')
  ...     def my_model_with_nick_name():
  ...         return
      >>>
      >>> # To register a class/function object by function call
  ...     class MyModel2:
  ...         pass
      >>> MODEL_REGISTRY.register(MyModel2)
      >>> # To register with a given name
      >>> MODEL_REGISTRY.register('my_model2', MyModel2)
      >>> # To list all the registered objects:
      >>> MODEL_REGISTRY.list_keys()
  
  ['MyModel', 'my_model', 'test_class', 'test_function', 'MyModel2', 'my_model2']
  
      >>> # To get the registered object/class
      >>> MODEL_REGISTRY.get('test_class')
  
  __main__.MyModelWithNickName
  
      
class_docstr_tok: ["Create","the","registry","that","will","map","name","to","object",".","This","facilitates","the","users","to","create","custom","registry",".","Parameters","--","--","--","--","--","name","The","name","of","the","registry","Examples","--","--","--","--",">",">",">","from","gluonnlp.utils.registry","import","Registry",">",">",">","#","Create","a","registry",">",">",">","MODEL_REGISTRY","=","Registry","(","'MODEL","'",")",">",">",">",">",">",">","#","To","register","a","class\/function","with","decorator",">",">",">","@","MODEL_REGISTRY.register","(",")","...","class","MyModel",":","...","pass",">",">",">","@","MODEL_REGISTRY.register","(",")","...","def","my_model","(",")",":","...","return",">",">",">",">",">",">","#","To","register","a","class","object","with","decorator","and","provide","nickname",":",">",">",">","@","MODEL_REGISTRY.register","(","'test_class","'",")","...","class","MyModelWithNickName",":","...","pass",">",">",">","@","MODEL_REGISTRY.register","(","'test_function","'",")","...","def","my_model_with_nick_name","(",")",":","...","return",">",">",">",">",">",">","#","To","register","a","class\/function","object","by","function","call","...","class","MyModel2",":","...","pass",">",">",">","MODEL_REGISTRY.register","(","MyModel2",")",">",">",">","#","To","register","with","a","given","name",">",">",">","MODEL_REGISTRY.register","(","'my_model2","'",",","MyModel2",")",">",">",">","#","To","list","all","the","registered","objects",":",">",">",">","MODEL_REGISTRY.list_keys","(",")","[","'MyModel","'",",","'my_model","'",",","'test_class","'",",","'test_function","'",",","'MyModel2","'",",","'my_model2","'","]",">",">",">","#","To","get","the","registered","object\/class",">",">",">","MODEL_REGISTRY.get","(","'test_class","'",")","__main__.MyModelWithNickName"]
code: def list_keys(self) -> List:
      return list(self._obj_map.keys())
  
file_path: gluon-nlp/src/gluonnlp/utils/registry.py
imports: from typing import Optional, List
  import json
  from json import JSONDecodeError
label_desc: Use image node_id 5 for calling the Registry obj's underlying member method code with example usage: obj.list_keys() and returns: list