code: def meshgrid(
      *arrays: Union[ivy.Array, ivy.NativeArray],
      sparse: bool = False,
      indexing: str = "xy",
      out: Optional[ivy.Array] = None,
  ) -> List[ivy.Array]:
      """Return coordinate matrices from coordinate vectors.
  
      Parameters
      ----------
      arrays
          an arbitrary number of one-dimensional arrays representing grid coordinates.
          Each array should have the same numeric data type.
      sparse
          if True, a sparse grid is returned in order to conserve memory.
          Default: ``False``.
      indexing
          Cartesian ``'xy'`` or matrix ``'ij'`` indexing of output. If provided zero or
          one one-dimensional vector(s) (i.e., the zero- and one-dimensional cases,
          respectively), the ``indexing`` keyword has no effect and should be ignored.
          Default: ``'xy'``.
  
      Returns
      -------
      ret
          list of N arrays, where ``N`` is the number of provided one-dimensional input
          arrays. Each returned array must have rank ``N``. For ``N`` one-dimensional
          arrays having lengths ``Ni = len(xi)``,
  
          - if matrix indexing ``ij``, then each returned array must have the shape
            ``(N1, N2, N3, ..., Nn)``.
          - if Cartesian indexing ``xy``, then each returned array must have shape
            ``(N2, N1, N3, ..., Nn)``.
  
          Accordingly, for the two-dimensional case with input one-dimensional arrays of
          length ``M`` and ``N``, if matrix indexing ``ij``, then each returned array must
          have shape ``(M, N)``, and, if Cartesian indexing ``xy``, then each returned
          array must have shape ``(N, M)``.
  
          Similarly, for the three-dimensional case with input one-dimensional arrays of
          length ``M``, ``N``, and ``P``, if matrix indexing ``ij``, then each returned
          array must have shape ``(M, N, P)``, and, if Cartesian indexing ``xy``, then
          each returned array must have shape ``(N, M, P)``.
  
          Each returned array should have the same data type as the input arrays.
  
  
      This function conforms to the `Array API Standard
      <https://data-apis.org/array-api/latest/>`_. This docstring is an extension of
      the `docstring <https://data-apis.org/array-api/latest/
      API_specification/generated/array_api.meshgrid.html>`_
      in the standard.
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([1, 2])
      >>> y = ivy.array([3, 4])
      >>> xv, yv = ivy.meshgrid(x, y)
      >>> print(xv)
      ivy.array([[1, 2],
              [1, 2]])
  
      >>> print(yv)
      ivy.array([[3, 3],
              [4, 4]])
  
      >>> x = ivy.array([1, 2, 5])
      >>> y = ivy.array([4, 1])
      >>> xv, yv = ivy.meshgrid(x, y, indexing='ij')
      >>> print(xv)
      ivy.array([[1, 1],
              [2, 2],
              [5, 5]])
  
      >>> print(yv)
      ivy.array([[4, 1],
              [4, 1],
              [4, 1]])
  
      >>> x = ivy.array([1, 2, 3])
      >>> y = ivy.array([4, 5, 6])
      >>> xv, yv = ivy.meshgrid(x, y, sparse=True)
      >>> print(xv)
      ivy.array([[1, 2, 3]])
  
      >>> print(yv)
      ivy.array([[4], [5], [6]])
  
      With :class:`ivy.NativeArray` input:
  
      >>> x = ivy.native_array([1, 2])
      >>> y = ivy.native_array([3, 4])
      >>> xv, yv = ivy.meshgrid(x, y)
      >>> print(xv)
      ivy.array([[1, 2],
              [1, 2]])
  
      >>> print(yv)
      ivy.array([[3, 3],
              [4, 4]])
      """
      return current_backend().meshgrid(
          *arrays, sparse=sparse, indexing=indexing, out=out
      )
  
imports: from __future__ import annotations
  import functools
  from numbers import Number
  from typing import Union, Tuple, Optional, List, Sequence, Callable, Protocol, TypeVar, Iterable
  import numpy
  import ivy
  from ivy import to_ivy
  from ivy.utils.exceptions import handle_exceptions
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, infer_dtype, handle_out_argument, outputs_to_ivy_arrays, inputs_to_native_arrays, inputs_to_native_shapes, to_native_arrays_and_back, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid, temp_asarray_wrapper
label_desc: Use image node_id 23 for calling a global function with example usage: meshgrid() and returns: current_backend