code: def get_data(img_shape):
      create_test_image = (
          create_test_image_2d
          if len(img_shape) == 2
          else create_test_image_3d
      )
      im = create_test_image(
          *img_shape,
          num_objs=4,
          rad_max=20,
          noise_max=0.0,
          num_seg_classes=5,
      )[0][None]
      return torch.Tensor(im)
  
file_path: MONAI/tests/test_fourier.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.data.synthetic import create_test_image_2d, create_test_image_3d
  from monai.transforms import Fourier
  from monai.utils.misc import set_determinism
  from tests.utils import SkipIfBeforePyTorchVersion, SkipIfNoModule
label_desc: Use image node_id 3 for calling the TestFourier obj's underlying member method code with example usage: obj.get_data(img_shape) and returns: torch