code: def _build_img_X_to_index_dict(self):
      assert (self.captures is not None) and (
          len(self.captures) > 0
      ), "there is no captures"
      for i, cap in enumerate(self.captures):
          assert (
              cap.image_path not in self.image_path_to_index
          ), "image already exists"
          self.image_path_to_index[cap.image_path] = i
          assert (
              os.path.basename(cap.image_path)
              not in self.fname_to_index_dict
          ), "Image already exists"
          self.fname_to_index_dict[os.path.basename(cap.image_path)] = i
  
file_path: ml-neuman/scenes/scene.py
imports: import os
  from tqdm import tqdm
label_desc: Use image node_id 3 for calling the ImageFileScene obj's underlying member method code with example usage: obj._build_img_X_to_index_dict() without return types