code: def _make_grid(dtype, grid_spec):
      """Returns a uniform grid + noise, reshaped to shape argument."""
      rng = np.random.RandomState(0)
      num_points = np.prod(grid_spec.shape)
      grid = np.linspace(
          grid_spec.min, grid_spec.max, num=num_points
      ).astype(dtype)
      grid_spacing = (grid_spec.max - grid_spec.min) / num_points
      grid += (
          0.1 * grid_spacing * rng.randn(*grid.shape)
      )  # pylint: disable=not-an-iterable
      # More useful if it's sorted (e.g. for testing monotonicity, or debugging).
      grid = np.sort(grid)
      return np.reshape(grid, grid_spec.shape)
  
imports: import collections
  import importlib
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops.distributions import special_math
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 3 for calling a global function with example usage: _make_grid(dtype, grid_spec) and returns: np