code: def asarray(
      obj: Union[
          ivy.Array,
          ivy.NativeArray,
          ivy.Shape,
          ivy.NativeShape,
          bool,
          int,
          float,
          NestedSequence,
          SupportsBufferProtocol,
          np.ndarray,
      ],
      /,
      *,
      copy: Optional[bool] = None,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      device: Optional[Union[ivy.Device, ivy.NativeDevice]] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Convert the input to an array.
  
      Parameters
      ----------
      obj
          input data, in any form that can be converted to an array. This includes lists,
          lists of tuples, tuples, tuples of tuples, tuples of lists and ndarrays.
      copy
          boolean, indicating whether or not to copy the input. Default: ``None``.
      dtype
         output array data type. If ``dtype`` is ``None``, the output array data type must
         be the default floating-point data type. Default  ``None``.
      device
         device on which to place the created array. Default: ``None``.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          An array interpretation of x.
  
      Examples
      --------
      With list of lists as input:
  
      >>> ivy.asarray([[1,2],[3,4]])
      ivy.array([[1, 2],
                 [3, 4]])
  
      With tuple of lists as input:
  
      >>> ivy.asarray(([1.4,5.6,5.5],[3.1,9.1,7.5]))
      ivy.array([[1.39999998, 5.5999999 , 5.5       ],
                 [3.0999999 , 9.10000038, 7.5       ]])
  
      With ndarray as input:
  
      >>> x = ivy.np.ndarray(shape=(2,2), order='C')
      >>> ivy.asarray(x)
      ivy.array([[6.90786433e-310, 6.90786433e-310],
                 [6.90786433e-310, 6.90786433e-310]])
  
      With :class:`ivy.Container` as input:
  
      >>> x = ivy.Container(a = [(1,2),(3,4),(5,6)], b = ((1,2,3),(4,5,6)))
      >>> ivy.asarray(x)
      {
          a: ivy.array([[1, 2],[3, 4], [5, 6]]),
          b: ivy.array([[1, 2, 3],
                     [4, 5, 6]])
      }
  
      This function conforms to the `Array API Standard
      <https://data-apis.org/array-api/latest/>`_. This docstring is an extension of the
      `docstring <https://data-apis.org/array-api/latest/
      API_specification/generated/array_api.asarray.html>`_
      in the standard.
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
      """
      return current_backend().asarray(
          obj, copy=copy, dtype=dtype, device=device, out=out
      )
  
imports: from __future__ import annotations
  import functools
  from numbers import Number
  from typing import Union, Tuple, Optional, List, Sequence, Callable, Protocol, TypeVar, Iterable
  import numpy
  import ivy
  from ivy import to_ivy
  from ivy.utils.exceptions import handle_exceptions
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, infer_dtype, handle_out_argument, outputs_to_ivy_arrays, inputs_to_native_arrays, inputs_to_native_shapes, to_native_arrays_and_back, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid, temp_asarray_wrapper
label_desc: Use image node_id 11 for calling a global function with example usage: asarray() and returns: current_backend