class_docstr: The callable currently does the following:
  1. Read the image from "file_name"
  2. Applies transforms to the image and annotations
  3. Prepare data and annotations to Tensor and :class:`Instances`
class_docstr_tok: ["The","callable","currently","does","the","following",":","1",".","Read","the","image","from","``","file_name","''","2",".","Applies","transforms","to","the","image","and","annotations","3",".","Prepare","data","and","annotations","to","Tensor","and",":","class",":","`","Instances","`"]
code: def from_config(cls, cfg, is_train: bool = True):
      augs = utils.build_augmentation(cfg, is_train)
      if cfg.INPUT.CROP.ENABLED and is_train:
          raise ValueError(
              "Crop augmentation not supported to point supervision."
          )
  
      ret = {
          "is_train": is_train,
          "augmentations": augs,
          "image_format": cfg.INPUT.FORMAT,
          "sample_points": cfg.INPUT.SAMPLE_POINTS,
      }
  
      return ret
  
file_path: detectron2/projects/PointSup/point_sup/dataset_mapper.py
imports: import copy
  import logging
  import numpy
  from typing import List, Union
  import torch
  import detectron2.data.detection_utils
  import detectron2.data.transforms
  from detectron2.config import configurable
  from .detection_utils import annotations_to_instances, transform_instance_annotations
label_desc: Use image node_id 2 for calling the PointSupDatasetMapper obj's underlying member method code with example usage: obj.from_config(cls, cfg, is_train) and returns: ret