class_docstr: MetadataCatalog provides access to "Metadata" of a given dataset.
  
  The metadata associated with a certain name is a singleton: once created,
  the metadata will stay alive and will be returned by future calls to `get(name)`.
  
  It's like global variables, so don't abuse it.
  It's meant for storing knowledge that's constant and shared across the execution
  of the program, e.g.: the class names in COCO.
docstr: Args:
      name (str): name of a dataset (e.g. coco_2014_train).
  
  Returns:
      Metadata: The :class:`Metadata` instance associated with this name,
      or create an empty one if none is available.
docstr_tok: ["Args",":","name","(","str",")",":","name","of","a","dataset","(","e.g",".","coco_2014_train",")",".","Returns",":","Metadata",":","The",":","class",":","`","Metadata","`","instance","associated","with","this","name",",","or","create","an","empty","one","if","none","is","available","."]
code: def get(name):
      """
      Args:
          name (str): name of a dataset (e.g. coco_2014_train).
  
      Returns:
          Metadata: The :class:`Metadata` instance associated with this name,
          or create an empty one if none is available.
      """
      assert len(name)
      if name in MetadataCatalog._NAME_TO_META:
          ret = MetadataCatalog._NAME_TO_META[name]
          # TODO this is for the BC breaking change in D15247032.
          # Remove this in the future.
          if hasattr(ret, "dataset_name"):
              logger = logging.getLogger()
              logger.warning(
                  "The 'dataset_name' key in metadata is no longer used for "
                  + "sharing metadata among splits after D15247032! Add "
                  + "metadata to each split (now called dataset) separately!"
              )
              parent_meta = MetadataCatalog.get(
                  ret.dataset_name
              ).as_dict()
              ret.set(**parent_meta)
          return ret
      else:
          m = MetadataCatalog._NAME_TO_META[name] = Metadata(name=name)
          return m
  
imports: import copy
  import logging
  import types
  from typing import List
label_desc: Use image node_id 1 for calling the MetadataCatalog obj's underlying member method code with example usage: obj.get(name) and returns: ret, m