class_docstr: This caller enables the default Detectron2 mapper to read an additional basis semantic label
code: def __init__(self, cfg, is_train=True):
      super().__init__(**DatasetMapper.from_config(cfg, is_train))
      logger = logging.getLogger(__name__)
      # Rebuild augmentations
      logger.info(
          "Rebuilding the augmentations. The previous augmentations will be overridden."
      )
      self.augmentation = build_augmentation_ranged_clip(cfg, is_train)
  
      if cfg.CONFIG.DATA.CROP.ENABLED and is_train:
          self.augmentation.append(
              RandomCropWithInstance(
                  cfg.CONFIG.DATA.CROP.TYPE,
                  cfg.CONFIG.DATA.CROP.SIZE,
                  cfg.CONFIG.DATA.CROP.CROP_INSTANCE,
              ),
          )
          logging.getLogger(__name__).info(
              "Cropping used in training: " + str(self.augmentation[-1])
          )
  
          # fmt: off
          # TODO(zhreshold): remove this?
          self.basis_loss_on = False  # cfg.CONFIG.MODEL.BASIS_MODULE.LOSS_ON
          self.ann_set = "coco"
  
imports: import itertools
  import copy
  import logging
  import numpy
  import torch
  from ..registry.catalog import DatasetCatalog, MetadataCatalog
  from ..detection.detection_dataset import load_proposals_into_dataset, filter_images_with_few_keypoints, filter_images_with_only_crowd_annotations, get_detection_dataset_dicts
  from ..detection.detection_dataset import print_instances_class_histogram, build_batch_data_loader, trivial_batch_collator
  from ..detection.detection_utils import check_metadata_consistency, read_image, filter_empty_instances, annotations_to_instances
  from ..detection.detection_utils import check_image_size, build_augmentation_ranged_clip, transform_instance_annotations
  from ..detection.detection_dataset import DatasetFromList, MapDataset, DatasetMapper
  from ..detection.samplers import RepeatFactorTrainingSampler, TrainingSampler, InferenceSampler
  from ..transforms import instance_transforms
  from ..transforms.instance_transforms import RandomCropWithInstance
  from ..structures import BoxMode
label_desc: Use image node_id 1 to create a new DatasetMapperWithBasis object from inherited base classes: DatasetMapper with example: obj = DatasetMapperWithBasis(cfg, is_train)