class_docstr: Constructs a Conditional Detr image processor.
  
  Args:
      format (`str`, *optional*, defaults to `"coco_detection"`):
          Data format of the annotations. One of "coco_detection" or "coco_panoptic".
      do_resize (`bool`, *optional*, defaults to `True`):
          Controls whether to resize the image's (height, width) dimensions to the specified `size`. Can be
          overridden by the `do_resize` parameter in the `preprocess` method.
      size (`Dict[str, int]` *optional*, defaults to `{"shortest_edge": 800, "longest_edge": 1333}`):
          Size of the image's (height, width) dimensions after resizing. Can be overridden by the `size` parameter in
          the `preprocess` method.
      resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BILINEAR`):
          Resampling filter to use if resizing the image.
      do_rescale (`bool`, *optional*, defaults to `True`):
          Controls whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the
          `do_rescale` parameter in the `preprocess` method.
      rescale_factor (`int` or `float`, *optional*, defaults to `1/255`):
          Scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter in the
          `preprocess` method.
      do_normalize:
          Controls whether to normalize the image. Can be overridden by the `do_normalize` parameter in the
          `preprocess` method.
      image_mean (`float` or `List[float]`, *optional*, defaults to `IMAGENET_DEFAULT_MEAN`):
          Mean values to use when normalizing the image. Can be a single value or a list of values, one for each
          channel. Can be overridden by the `image_mean` parameter in the `preprocess` method.
      image_std (`float` or `List[float]`, *optional*, defaults to `IMAGENET_DEFAULT_STD`):
          Standard deviation values to use when normalizing the image. Can be a single value or a list of values, one
          for each channel. Can be overridden by the `image_std` parameter in the `preprocess` method.
      do_pad (`bool`, *optional*, defaults to `True`):
          Controls whether to pad the image to the largest image in a batch and create a pixel mask. Can be
          overridden by the `do_pad` parameter in the `preprocess` method.
docstr: Pads a batch of images to the bottom and right of the image with zeros to the size of largest height and width
  in the batch and optionally returns their corresponding pixel mask.
  
  Args:
      image (`np.ndarray`):
          Image to pad.
      constant_values (`float` or `Iterable[float]`, *optional*):
          The value to use for the padding if `mode` is `"constant"`.
      return_pixel_mask (`bool`, *optional*, defaults to `True`):
          Whether to return a pixel mask.
      return_tensors (`str` or `TensorType`, *optional*):
          The type of tensors to return. Can be one of:
              - Unset: Return a list of `np.ndarray`.
              - `TensorType.TENSORFLOW` or `'tf'`: Return a batch of type `tf.Tensor`.
              - `TensorType.PYTORCH` or `'pt'`: Return a batch of type `torch.Tensor`.
              - `TensorType.NUMPY` or `'np'`: Return a batch of type `np.ndarray`.
              - `TensorType.JAX` or `'jax'`: Return a batch of type `jax.numpy.ndarray`.
      data_format (`str` or `ChannelDimension`, *optional*):
          The channel dimension format of the image. If not provided, it will be the same as the input image.
      input_data_format (`ChannelDimension` or `str`, *optional*):
          The channel dimension format of the input image. If not provided, it will be inferred.
docstr_tok: ["Pads","a","batch","of","images","to","the","bottom","and","right","of","the","image","with","zeros","to","the","size","of","largest","height","and","width","in","the","batch","and","optionally","returns","their","corresponding","pixel","mask",".","Args",":","image","(","`","np.ndarray","`",")",":","Image","to","pad",".","constant_values","(","`","float","`","or","`","Iterable","[","float","]","`",",","*","optional","*",")",":","The","value","to","use","for","the","padding","if","`","mode","`","is","`","``","constant","''","`",".","return_pixel_mask","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","return","a","pixel","mask",".","return_tensors","(","`","str","`","or","`","TensorType","`",",","*","optional","*",")",":","The","type","of","tensors","to","return",".","Can","be","one","of",":","-","Unset",":","Return","a","list","of","`","np.ndarray","`",".","-","`","TensorType.TENSORFLOW","`","or","`","'tf","'","`",":","Return","a","batch","of","type","`","tf.Tensor","`",".","-","`","TensorType.PYTORCH","`","or","`","'pt","'","`",":","Return","a","batch","of","type","`","torch.Tensor","`",".","-","`","TensorType.NUMPY","`","or","`","'np","'","`",":","Return","a","batch","of","type","`","np.ndarray","`",".","-","`","TensorType.JAX","`","or","`","'jax","'","`",":","Return","a","batch","of","type","`","jax.numpy.ndarray","`",".","data_format","(","`","str","`","or","`","ChannelDimension","`",",","*","optional","*",")",":","The","channel","dimension","format","of","the","image",".","If","not","provided",",","it","will","be","the","same","as","the","input","image",".","input_data_format","(","`","ChannelDimension","`","or","`","str","`",",","*","optional","*",")",":","The","channel","dimension","format","of","the","input","image",".","If","not","provided",",","it","will","be","inferred","."]
code: def pad(
      self,
      images: List[np.ndarray],
      constant_values: Union[float, Iterable[float]] = 0,
      return_pixel_mask: bool = True,
      return_tensors: Optional[Union[str, TensorType]] = None,
      data_format: Optional[ChannelDimension] = None,
      input_data_format: Optional[Union[str, ChannelDimension]] = None,
  ) -> BatchFeature:
      """
      Pads a batch of images to the bottom and right of the image with zeros to the size of largest height and width
      in the batch and optionally returns their corresponding pixel mask.
  
      Args:
          image (`np.ndarray`):
              Image to pad.
          constant_values (`float` or `Iterable[float]`, *optional*):
              The value to use for the padding if `mode` is `"constant"`.
          return_pixel_mask (`bool`, *optional*, defaults to `True`):
              Whether to return a pixel mask.
          return_tensors (`str` or `TensorType`, *optional*):
              The type of tensors to return. Can be one of:
                  - Unset: Return a list of `np.ndarray`.
                  - `TensorType.TENSORFLOW` or `'tf'`: Return a batch of type `tf.Tensor`.
                  - `TensorType.PYTORCH` or `'pt'`: Return a batch of type `torch.Tensor`.
                  - `TensorType.NUMPY` or `'np'`: Return a batch of type `np.ndarray`.
                  - `TensorType.JAX` or `'jax'`: Return a batch of type `jax.numpy.ndarray`.
          data_format (`str` or `ChannelDimension`, *optional*):
              The channel dimension format of the image. If not provided, it will be the same as the input image.
          input_data_format (`ChannelDimension` or `str`, *optional*):
              The channel dimension format of the input image. If not provided, it will be inferred.
      """
      pad_size = get_max_height_width(
          images, input_data_format=input_data_format
      )
  
      padded_images = [
          self._pad_image(
              image,
              pad_size,
              constant_values=constant_values,
              data_format=data_format,
              input_data_format=input_data_format,
          )
          for image in images
      ]
      data = {"pixel_values": padded_images}
  
      if return_pixel_mask:
          masks = [
              make_pixel_mask(
                  image=image,
                  output_size=pad_size,
                  input_data_format=input_data_format,
              )
              for image in images
          ]
          data["pixel_mask"] = masks
  
      return BatchFeature(data=data, tensor_type=return_tensors)
  
imports: import io
  import pathlib
  from collections import defaultdict
  from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Union
  import numpy
  from ...feature_extraction_utils import BatchFeature
  from ...image_processing_utils import BaseImageProcessor, get_size_dict
  from ...image_transforms import PaddingMode, center_to_corners_format, corners_to_center_format, id_to_rgb, pad, rescale, resize, rgb_to_id, to_channel_dimension_format
  from ...image_utils import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, AnnotationFormat, AnnotationType, ChannelDimension, ImageInput, PILImageResampling, get_image_size, infer_channel_dimension_format, is_scaled_image, make_list_of_images, to_numpy_array, valid_images, validate_annotations
  from ...utils import TensorType, is_flax_available, is_jax_tensor, is_scipy_available, is_tf_available, is_tf_tensor, is_torch_available, is_torch_tensor, is_vision_available, logging
label_desc: Use image node_id 13 for calling the ConditionalDetrImageProcessor obj's underlying member method code with example usage: obj.pad(images, constant_values, return_pixel_mask, return_tensors, data_format, input_data_format) and returns: BatchFeature