code: def get_class_names(dataset):
      if dataset == "coco":
          from mmdet.datasets import CocoDataset
  
          class_names = CocoDataset.METAINFO["classes"]
      elif dataset == "cityscapes":
          from mmdet.datasets import CityscapesDataset
  
          class_names = CityscapesDataset.METAINFO["classes"]
      elif dataset == "voc":
          from mmdet.datasets import VOCDataset
  
          class_names = VOCDataset.METAINFO["classes"]
      elif dataset == "openimages":
          from mmdet.datasets import OpenImagesDataset
  
          class_names = OpenImagesDataset.METAINFO["classes"]
      elif dataset == "lvis":
          from mmdet.datasets import LVISV1Dataset
  
          class_names = LVISV1Dataset.METAINFO["classes"]
      else:
          raise TypeError(
              f"Invalid type for dataset name: {type(dataset)}"
          )
      return class_names
  
file_path: mmdetection/projects/Detic/detic/utils.py
imports: import numpy
  import torch
  import torch.nn.functional
  from mmengine.logging import print_log
  from .text_encoder import CLIPTextEncoder
label_desc: Use image node_id 2 for calling a global function with example usage: get_class_names(dataset) and returns: class_names