code: def meshgrid(*xi, **kwargs):
      """Return coordinate matrices from coordinate vectors.
  
      Given one-dimensional coordinate arrays ``x1, x2, ... , xn`` this
      function makes N-D grids.
  
      For one-dimensional arrays ``x1, x2, ... , xn`` with lengths
      ``Ni = len(xi)``, this function returns ``(N1, N2, N3, ..., Nn)`` shaped
      arrays if indexing='ij' or ``(N2, N1, N3, ..., Nn)`` shaped arrays
      if indexing='xy'.
  
      Unlike NumPy, CuPy currently only supports 1-D arrays as inputs.
  
      Args:
          xi (tuple of ndarrays): 1-D arrays representing the coordinates
              of a grid.
          indexing ({'xy', 'ij'}, optional): Cartesian ('xy', default) or
              matrix ('ij') indexing of output.
          sparse (bool, optional): If ``True``, a sparse grid is returned in
              order to conserve memory. Default is ``False``.
          copy (bool, optional): If ``False``, a view
              into the original arrays are returned. Default is ``True``.
  
      Returns:
          list of cupy.ndarray
  
      .. seealso:: :func:`numpy.meshgrid`
  
      """
      indexing = kwargs.pop("indexing", "xy")
      copy = bool(kwargs.pop("copy", True))
      sparse = bool(kwargs.pop("sparse", False))
      if kwargs:
          raise TypeError(
              "meshgrid() got an unexpected keyword argument '{}'".format(
                  list(kwargs)[0]
              )
          )
      if indexing not in ["xy", "ij"]:
          raise ValueError(
              "Valid values for `indexing` are 'xy' and 'ij'."
          )
  
      for x in xi:
          if x.ndim != 1:
              raise ValueError("input has to be 1d")
          if not isinstance(x, cupy.ndarray):
              raise ValueError("input has to be cupy.ndarray")
      if len(xi) <= 1:
          return list(xi)
  
      meshes = []
      for i, x in enumerate(xi):
          if indexing == "xy" and i == 0:
              left_none = 1
          elif indexing == "xy" and i == 1:
              left_none = 0
          else:
              left_none = i
  
          expand_slices = (
              (None,) * left_none
              + (slice(None),)
              + (None,) * (len(xi) - (left_none + 1))
          )
          meshes.append(x[expand_slices])
  
      if sparse:
          meshes_br = meshes
      else:
          meshes_br = list(cupy.broadcast_arrays(*meshes))
  
      if copy:
          for i in range(len(meshes_br)):
              meshes_br[i] = meshes_br[i].copy()
      return meshes_br
  
file_path: cupy/cupy/_creation/ranges.py
imports: import math
  import numpy
  import cupy
  from cupy import _core
label_desc: Use image node_id 5 for calling a global function with example usage: meshgrid() and returns: meshes_br, list