code: def diff(
      x: Union[np.ndarray, list, tuple],
      /,
      *,
      n: int = 1,
      axis: int = -1,
      prepend: Optional[
          Union[np.ndarray, int, float, list, tuple]
      ] = None,
      append: Optional[
          Union[np.ndarray, int, float, list, tuple]
      ] = None,
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      prepend = prepend if prepend is not None else np._NoValue
      append = append if append is not None else np._NoValue
      return np.diff(x, n=n, axis=axis, prepend=prepend, append=append)
  
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 12 for calling a global function with example usage: diff() and returns: np