code: def squeeze(
      x: np.ndarray,
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      copy: Optional[bool] = None,
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      if isinstance(axis, list):
          axis = tuple(axis)
      if x.shape == ():
          if axis is None or axis == 0 or axis == -1:
              return x
          raise ivy.utils.exceptions.IvyException(
              f"tried to squeeze a zero-dimensional input by axis {axis}"
          )
      return np.squeeze(x, axis=axis)
  
imports: import math
  from numbers import Number
  from typing import Union, Tuple, Optional, List, Sequence
  import numpy
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 8 for calling a global function with example usage: squeeze() and returns: np, x