code: def __init__(
      self, lvis_api: LVIS, img_ids: Optional[List[int]] = None
  ):
      super(LVISDetectionTargets, self).__init__()
      self.lvis_api = lvis_api
      if img_ids is None:
          img_ids = list(sorted(lvis_api.get_img_ids()))
  
      self.img_ids = img_ids
  
imports: from pathlib import Path
  from typing import Optional, Union, List, Sequence
  import torch
  from PIL import Image
  from torchvision.datasets.folder import default_loader
  from torchvision.transforms import ToTensor
  from typing_extensions import TypedDict
  from avalanche.benchmarks.datasets import DownloadableDataset, default_dataset_location
  from avalanche.benchmarks.datasets.lvis_dataset.lvis_data import lvis_archives
label_desc: Use image node_id 1 to create a new LVISDetectionTargets object from inherited base classes: Sequence with example: obj = LVISDetectionTargets(lvis_api, img_ids)