code: def gradient(
      x: np.ndarray,
      /,
      *,
      spacing: Union[int, list, tuple] = 1,
      axis: Optional[Union[int, list, tuple]] = None,
      edge_order: int = 1,
  ) -> Union[np.ndarray, List[np.ndarray]]:
      if type(spacing) in (int, float):
          return np.gradient(
              x, spacing, axis=axis, edge_order=edge_order
          )
      return np.gradient(x, *spacing, axis=axis, edge_order=edge_order)
  
imports: from typing import Optional, Union, Tuple, List, Sequence
  import numpy
  import numpy.typing
  import ivy
  from ivy import promote_types_of_inputs
  from ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 17 for calling a global function with example usage: gradient() and returns: np, np