def _get_batch_size(self,
                        points: Optional[Tuple[paddle.Tensor, paddle.Tensor]],
                        boxes: Optional[paddle.Tensor],
                        masks: Optional[paddle.Tensor]) -> int:
        """
        Gets the batch size of the output given the batch size of the input prompts.
        """
        if points is not None:
            return points[0].shape[0]
        elif boxes is not None:
            return boxes.shape[0]
        elif masks is not None:
            return masks.shape[0]
        else:
            return 1

        Gets the batch size of the output given the batch size of the input prompts.
        
contrib/SegmentAnything/segment_anything/modeling/prompt_encoder.py