code: def _get_params(self, flat_inputs: List[Any]) -> Dict[str, Any]:
      height, width = query_size(flat_inputs)
      new_height = min(height, self.crop_height)
      new_width = min(width, self.crop_width)
  
      needs_crop = new_height != height or new_width != width
  
      offset_height = max(height - self.crop_height, 0)
      offset_width = max(width - self.crop_width, 0)
  
      r = torch.rand(1)
      top = int(offset_height * r)
      left = int(offset_width * r)
  
      bounding_boxes: Optional[torch.Tensor]
      try:
          bounding_boxes = get_bounding_boxes(flat_inputs)
      except ValueError:
          bounding_boxes = None
  
      if needs_crop and bounding_boxes is not None:
          format = bounding_boxes.format
          bounding_boxes, canvas_size = F.crop_bounding_boxes(
              bounding_boxes.as_subclass(torch.Tensor),
              format=format,
              top=top,
              left=left,
              height=new_height,
              width=new_width,
          )
          bounding_boxes = F.clamp_bounding_boxes(
              bounding_boxes, format=format, canvas_size=canvas_size
          )
          height_and_width = F.convert_bounding_box_format(
              bounding_boxes,
              old_format=format,
              new_format=tv_tensors.BoundingBoxFormat.XYWH,
          )[..., 2:]
          is_valid = torch.all(height_and_width > 0, dim=-1)
      else:
          is_valid = None
  
      pad_bottom = max(self.crop_height - new_height, 0)
      pad_right = max(self.crop_width - new_width, 0)
  
      needs_pad = pad_bottom != 0 or pad_right != 0
  
      return dict(
          needs_crop=needs_crop,
          top=top,
          left=left,
          height=new_height,
          width=new_width,
          is_valid=is_valid,
          padding=[0, 0, pad_right, pad_bottom],
          needs_pad=needs_pad,
      )
  
file_path: vision/torchvision/prototype/transforms/_geometry.py
imports: from typing import Any, Dict, List, Optional, Sequence, Type, Union
  import PIL.Image
  import torch
  from torchvision import tv_tensors
  from torchvision.prototype.tv_tensors import Label, OneHotLabel
  from torchvision.transforms.v2 import functional, Transform
  from torchvision.transforms.v2._utils import _FillType, _get_fill, _setup_fill_arg, _setup_size, get_bounding_boxes, has_any, is_pure_tensor, query_size
label_desc: Use image node_id 3 for calling the FixedSizeCrop obj's underlying member method code with example usage: obj._get_params(flat_inputs) and returns: dict