class_docstr: Constructs a SAM processor which wraps a SAM image processor and an 2D points & Bounding boxes processor into a
  single processor.
  
  [`SamProcessor`] offers all the functionalities of [`SamImageProcessor`]. See the docstring of
  [`~SamImageProcessor.__call__`] for more information.
  
  Args:
      image_processor (`SamImageProcessor`):
          An instance of [`SamImageProcessor`]. The image processor is a required input.
docstr: The method pads the 2D points and labels to the maximum number of points in the batch.
docstr_tok: ["The","method","pads","the","2D","points","and","labels","to","the","maximum","number","of","points","in","the","batch","."]
code: def _pad_points_and_labels(self, input_points, input_labels):
      r"""
      The method pads the 2D points and labels to the maximum number of points in the batch.
      """
      expected_nb_points = max(
          [point.shape[0] for point in input_points]
      )
      processed_input_points = []
      for i, point in enumerate(input_points):
          if point.shape[0] != expected_nb_points:
              point = np.concatenate(
                  [
                      point,
                      np.zeros((expected_nb_points - point.shape[0], 2))
                      + self.point_pad_value,
                  ],
                  axis=0,
              )
              input_labels[i] = np.append(
                  input_labels[i], [self.point_pad_value]
              )
          processed_input_points.append(point)
      input_points = processed_input_points
      return input_points, input_labels
  
file_path: transformers/src/transformers/models/sam/processing_sam.py
imports: from copy import deepcopy
  from typing import Optional, Union
  import numpy
  from ...processing_utils import ProcessorMixin
  from ...tokenization_utils_base import BatchEncoding
  from ...utils import TensorType, is_tf_available, is_torch_available
label_desc: Use image node_id 4 for calling the SamProcessor obj's underlying member method code with example usage: obj._pad_points_and_labels(input_points, input_labels) and returns: input_points,  input_labels