code: def _to_ivy(x: Any) -> Any:
      if isinstance(x, ivy.Array):
          return x
      elif isinstance(x, ivy.NativeShape):
          return ivy.Shape(x)
      elif isinstance(x, ivy.Container):
          return x.to_ivy()
      if ivy.is_native_array(x) or isinstance(x, np.ndarray):
          return ivy.Array(x)
      return x
  
file_path: ivy/ivy/data_classes/array/conversions.py
imports: import numpy
  from typing import Any, Union, Tuple, Dict, Iterable, Optional
  import ivy
label_desc: Use image node_id 4 for calling a global function with example usage: _to_ivy(x) and returns: x, x, ivy, ivy, x