code: def make_grid(shape, dtype=None, device=None, requires_grad=True):
      ranges = [
          torch.arange(
              float(s),
              dtype=dtype,
              device=device,
              requires_grad=requires_grad,
          )
          for s in shape
      ]
      grid = torch.stack(meshgrid_ij(*ranges), dim=-1)
      return grid[None]
  
file_path: MONAI/tests/test_grid_pull.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.networks.layers import grid_pull
  from monai.networks.utils import meshgrid_ij
  from monai.utils import optional_import
  from tests.testing_data.cpp_resample_answers import Expected_1D_GP_bwd, Expected_1D_GP_fwd
  from tests.utils import skip_if_no_cpp_extension
label_desc: Use image node_id 1 for calling a global function with example usage: make_grid(shape, dtype, device, requires_grad) and returns: grid