class_docstr: Encode an image with a supported file encoding.
class_docstr_tok: ["Encode","an","image","with","a","supported","file","encoding","."]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      group = parser.add_argument_group(title=cls.__name__)
  
      group.add_argument(
          "--image-augmentation.pil-save.enable",
          action="store_true",
          help="Use {}. This flag is useful when you want to study the effect of different "
          "transforms.".format(cls.__name__),
      )
      group.add_argument(
          "--image-augmentation.pil-save.file-encoding",
          choices=("fCHW", "fHWC", "TIFF", "PNG", "JPEG"),
          help="The type of file encoding to use. Defaults to TIFF.",
          default="TIFF",
      )
      group.add_argument(
          "--image-augmentation.pil-save.quality",
          help="JPEG quality if using JPEG encoding. Defaults to 100.",
          type=int,
          default=100,
      )
      return parser
  
imports: import argparse
  import io
  from typing import Dict, Union
  import numpy
  import torch
  from PIL import Image
  from data.transforms import TRANSFORMATIONS_REGISTRY, BaseTransformation
label_desc: Use image node_id 4 for calling the PILSave obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser