code: def _get_data_dims_and_points_for_perspective():
      # Ideally we would parametrize independently over data dims and points, but
      # we want to tests on some points that also depend on the data dims.
      # Pytest doesn't support covariant parametrization, so we do it somewhat manually here.
  
      data_dims = [(26, 34), (26, 26)]
      points = [
          [
              [[0, 0], [33, 0], [33, 25], [0, 25]],
              [[3, 2], [32, 3], [30, 24], [2, 25]],
          ],
          [
              [[3, 2], [32, 3], [30, 24], [2, 25]],
              [[0, 0], [33, 0], [33, 25], [0, 25]],
          ],
          [
              [[3, 2], [32, 3], [30, 24], [2, 25]],
              [[5, 5], [30, 3], [33, 19], [4, 25]],
          ],
      ]
  
      dims_and_points = list(itertools.product(data_dims, points))
  
      # up to here, we could just have used 2 @parametrized.
      # Down below is the covarariant part as the points depend on the data dims.
  
      n = 10
      for dim in data_dims:
          points += [
              (
                  dim,
                  T.RandomPerspective.get_params(dim[1], dim[0], i / n),
              )
              for i in range(n)
          ]
      return dims_and_points
  
imports: import colorsys
  import itertools
  import math
  import os
  from functools import partial
  from typing import Sequence
  import numpy
  import PIL.Image
  import pytest
  import torch
  import torchvision.transforms
  import torchvision.transforms._functional_pil
  import torchvision.transforms._functional_tensor
  import torchvision.transforms.functional
  from common_utils import _assert_approx_equal_tensor_to_pil, _assert_equal_tensor_to_pil, _create_data, _create_data_batch, _test_fn_on_batch, assert_equal, cpu_and_cuda, needs_cuda
  from torchvision.transforms import InterpolationMode
label_desc: Use image node_id 3 for calling a global function with example usage: _get_data_dims_and_points_for_perspective() and returns: dims_and_points