code: def get_grid(points, resolution):
      eps = 0.2
      input_min = torch.min(points, dim=0)[0].squeeze().numpy()
      input_max = torch.max(points, dim=0)[0].squeeze().numpy()
  
      bounding_box = input_max - input_min
      shortest_axis = np.argmin(bounding_box)
      if shortest_axis == 0:
          x = np.linspace(
              input_min[shortest_axis] - eps,
              input_max[shortest_axis] + eps,
              resolution,
          )
          length = np.max(x) - np.min(x)
          y = np.arange(
              input_min[1] - eps,
              input_max[1] + length / (x.shape[0] - 1) + eps,
              length / (x.shape[0] - 1),
          )
          z = np.arange(
              input_min[2] - eps,
              input_max[2] + length / (x.shape[0] - 1) + eps,
              length / (x.shape[0] - 1),
          )
      elif shortest_axis == 1:
          y = np.linspace(
              input_min[shortest_axis] - eps,
              input_max[shortest_axis] + eps,
              resolution,
          )
          length = np.max(y) - np.min(y)
          x = np.arange(
              input_min[0] - eps,
              input_max[0] + length / (y.shape[0] - 1) + eps,
              length / (y.shape[0] - 1),
          )
          z = np.arange(
              input_min[2] - eps,
              input_max[2] + length / (y.shape[0] - 1) + eps,
              length / (y.shape[0] - 1),
          )
      elif shortest_axis == 2:
          z = np.linspace(
              input_min[shortest_axis] - eps,
              input_max[shortest_axis] + eps,
              resolution,
          )
          length = np.max(z) - np.min(z)
          x = np.arange(
              input_min[0] - eps,
              input_max[0] + length / (z.shape[0] - 1) + eps,
              length / (z.shape[0] - 1),
          )
          y = np.arange(
              input_min[1] - eps,
              input_max[1] + length / (z.shape[0] - 1) + eps,
              length / (z.shape[0] - 1),
          )
  
      xx, yy, zz = np.meshgrid(x, y, z)
      grid_points = torch.tensor(
          np.vstack([xx.ravel(), yy.ravel(), zz.ravel()]).T,
          dtype=torch.float,
      ).cuda()
      return {
          "grid_points": grid_points,
          "shortest_axis_length": length,
          "xyz": [x, y, z],
          "shortest_axis_index": shortest_axis,
      }
  
imports: import plotly.graph_objs
  import plotly.offline
  import numpy
  import torch
  from skimage import measure
  import torchvision
  import trimesh
  from PIL import Image
  from utils import rend_util
  import pickle
label_desc: Use image node_id 11 for calling a global function with example usage: get_grid(points, resolution) and returns: dict