code: def grid(shape, axes, directions, aspect_ratio=None):
      grids = [numpy.linspace(1, 2, dim) for dim in shape]
      for index, (axis, direction) in enumerate(zip(axes, directions)):
          grids[axis] = nodes_lookup[direction](shape[axes[index]])
  
      return numpy.array(meshgrid(*grids))
  
imports: from __future__ import division
  import itertools
  import random
  import unittest
  import numpy
  import pyfftw
  from pyfftw import _supported_types
  from .test_pyfftw_base import run_test_suites
label_desc: Use image node_id 2 for calling a global function with example usage: grid(shape, axes, directions, aspect_ratio) and returns: numpy