code: def _get_config_directory():
      """Find the predefined detector config directory."""
      try:
          # Assume we are running in the source mmdetection repo
          repo_dpath = dirname(dirname(dirname(__file__)))
      except NameError:
          # For IPython development when this __file__ is not defined
          import mmdet
  
          repo_dpath = dirname(dirname(mmdet.__file__))
      config_dpath = join(repo_dpath, "configs")
      if not exists(config_dpath):
          raise Exception("Cannot find config path")
      return config_dpath
  
imports: import copy
  from os.path import dirname, exists, join
  import numpy
  import torch
  from mmengine.config import Config
  from mmengine.dataset import pseudo_collate
  from mmengine.structures import InstanceData, PixelData
  from mmdet.utils.util_random import ensure_rng
  from ..registry import TASK_UTILS
  from ..structures import DetDataSample, TrackDataSample
  from ..structures.bbox import HorizontalBoxes
label_desc: Use image node_id 1 for calling a global function with example usage: _get_config_directory() and returns: config_dpath