class_docstr: LVIS v1 dataset for detection.
class_docstr_tok: ["LVIS","v1","dataset","for","detection","."]
docstr: Get annotation by index and automatically call ``full_init`` if the
  dataset has not been fully initialized.
  
  Args:
      idx (int): The index of data.
  
  Returns:
      dict: The idx-th annotation of the dataset.
docstr_tok: ["Get","annotation","by","index","and","automatically","call","``","full_init","``","if","the","dataset","has","not","been","fully","initialized",".","Args",":","idx","(","int",")",":","The","index","of","data",".","Returns",":","dict",":","The","idx-th","annotation","of","the","dataset","."]
code: def get_data_info(self, idx: int) -> dict:
      """Get annotation by index and automatically call ``full_init`` if the
      dataset has not been fully initialized.
  
      Args:
          idx (int): The index of data.
  
      Returns:
          dict: The idx-th annotation of the dataset.
      """
      if self.serialize_data:
          start_addr = (
              0 if idx == 0 else self.data_address[idx - 1].item()
          )
          end_addr = self.data_address[idx].item()
          bytes = memoryview(
              self.data_bytes[start_addr:end_addr]
          )  # type: ignore
          data_info = pickle.loads(bytes)  # type: ignore
      else:
          data_info = copy.deepcopy(self.data_list[idx])
  
      # Some codebase needs `sample_idx` of data information. Here we convert
      # the idx to a positive number and save it in data information.
      if idx >= 0:
          data_info["sample_idx"] = idx
      else:
          data_info["sample_idx"] = len(self) + idx
  
      return data_info
  
file_path: mmdetection/projects/Detic_new/detic/imagenet_lvis.py
imports: import copy
  import os.path
  import pickle
  import warnings
  from typing import List, Union
  from mmengine.fileio import get_local_path
  from mmdet.datasets import LVISV1Dataset
  from mmdet.registry import DATASETS
label_desc: Use image node_id 1 for calling the ImageNetLVISV1Dataset obj's underlying member method code with example usage: obj.get_data_info(idx) and returns: data_info