code: def shape(
      x: paddle.Tensor, /, *, as_array: bool = False
  ) -> Union[ivy.Shape, ivy.Array]:
      if as_array:
          return ivy.array(x.shape, dtype=ivy.default_int_dtype())
      else:
          return ivy.Shape(x.shape)
  
imports: from numbers import Number
  from typing import Optional, Union, Sequence, Callable, List, Tuple
  import paddle
  import numpy
  import multiprocessing
  import ivy
  import ivy.functional.backends.paddle
  from ivy.func_wrapper import with_unsupported_device_and_dtypes
  from ivy.functional.ivy.general import _broadcast_to
  from ivy.utils.exceptions import _check_inplace_update_support
  from .None import backend_version
label_desc: Use image node_id 22 for calling a global function with example usage: shape() and returns: ivy, ivy