code: def squeeze(
      x: paddle.Tensor,
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      copy: Optional[bool] = None,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      if isinstance(axis, list):
          axis = tuple(axis)
      if len(x.shape) == 0:
          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}"
          )
      if x.ndim > 6:
          # Paddle squeeze sets a maximum limit of 6 dims in the input
          x_shape = x.shape
          x_shape.pop(axis)
          return paddle_backend.reshape(x, x_shape)
      return paddle.squeeze(x, axis=axis)
  
imports: from numbers import Number
  from typing import Union, Optional, Tuple, List, Sequence, Iterable
  import math
  import paddle
  import ivy
  import ivy.functional.backends.paddle
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  from ...ivy.manipulation import _calculate_out_shape
label_desc: Use image node_id 8 for calling a global function with example usage: squeeze() and returns: paddle, paddle_backend, x