code: def _to_ivy_array(x):
      # if x is a native array return it as an ivy array
      if isinstance(x, ivy.NativeArray):
          return ivy.array(x)
  
      # else if x is a frontend torch Tensor (or any frontend "Tensor" actually) return the wrapped ivy array # noqa: E501
      elif hasattr(x, "ivy_array"):
          return x.ivy_array
  
      # else just return x
      return x
  
file_path: ivy/ivy/functional/frontends/paddle/func_wrapper.py
imports: from typing import Callable
  import functools
  import ivy
  import ivy.functional.frontends.paddle
label_desc: Use image node_id 2 for calling a global function with example usage: _to_ivy_array(x) and returns: x, ivy, x