code: def _create_identity_grid(size: List[int]) -> Tensor:
      hw_space = [
          torch.linspace((-s + 1) / s, (s - 1) / s, s) for s in size
      ]
      grid_y, grid_x = torch.meshgrid(hw_space, indexing="ij")
      return torch.stack([grid_x, grid_y], -1).unsqueeze(0)
  
imports: import warnings
  from typing import List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn.functional import conv2d, grid_sample, interpolate, pad
label_desc: Use image node_id 49 for calling a global function with example usage: _create_identity_grid(size) and returns: torch