parameters: (self)
return_statement: return self.class_indexing
docstring: Get the class index.
  
          Returns:
              dict, a str-to-int mapping from label name to index.
  
          Examples:
              >>> voc_dataset_dir = "/path/to/voc_dataset_directory"
              >>>
              >>> dataset = ds.VOCDataset(dataset_dir=voc_dataset_dir, task="Detection")
              >>> class_indexing = dataset.get_class_indexing()
docstring_summary: Get the class index.
docstring_tokens: Get the class index .
function: def get_class_indexing(self):
          """
          Get the class index.
  
          Returns:
              dict, a str-to-int mapping from label name to index.
  
          Examples:
              >>> voc_dataset_dir = "/path/to/voc_dataset_directory"
              >>>
              >>> dataset = ds.VOCDataset(dataset_dir=voc_dataset_dir, task="Detection")
              >>> class_indexing = dataset.get_class_indexing()
          """
          if self.task != "Detection":
              raise NotImplementedError("Only 'Detection' support get_class_indexing.")
          if self.class_indexing is None or not self.class_indexing:
              if self._class_indexing is None:
                  runtime_getter = self._init_tree_getters()
                  self._class_indexing = runtime_getter[0].GetClassIndexing()
              self.class_indexing = {}
              for pair in self._class_indexing:
                  self.class_indexing[pair[0]] = pair[1][0]
          return self.class_indexing
function_tokens: def get_class_indexing ( self ) : if self . task != "Detection" : raise NotImplementedError ( "Only 'Detection' support get_class_indexing." ) if self . class_indexing is None or not self . class_indexing : if self . _class_indexing is None : runtime_getter = self . _init_tree_getters ( ) self . _class_indexing = runtime_getter [ 0 ] . GetClassIndexing ( ) self . class_indexing = { } for pair in self . _class_indexing : self . class_indexing [ pair [ 0 ] ] = pair [ 1 ] [ 0 ] return self . class_indexing