class_docstr: Class for registry object which acts as central source of truth
  for MMF
docstr: Register an item to registry with key 'name'
  
  Args:
      name: Key with which the item will be registered.
  
  Usage::
  
      from mmf.common.registry import registry
  
      registry.register("config", {})
docstr_tok: ["Register","an","item","to","registry","with","key","'name'","Args",":","name",":","Key","with","which","the","item","will","be","registered",".","Usage",":",":","from","mmf.common.registry","import","registry","registry.register","(","``","config","''",",","{","}",")"]
code: def register(cls, name, obj):
      r"""Register an item to registry with key 'name'
  
      Args:
          name: Key with which the item will be registered.
  
      Usage::
  
          from mmf.common.registry import registry
  
          registry.register("config", {})
      """
      path = name.split(".")
      current = cls.mapping["state"]
  
      for part in path[:-1]:
          if part not in current:
              current[part] = {}
          current = current[part]
  
      current[path[-1]] = obj
  
imports: from mmf.utils.env import setup_imports
label_desc: Use image node_id 20 for calling the Registry obj's underlying member method code with example usage: obj.register(cls, name, obj) without return types