code: def test_asarray_errors():
      # Test various protections against incorrect usage
      assert_raises(TypeError, lambda: Array([1]))
      #    assert_raises(TypeError, lambda: asarray(["a"]))  # TODO(leofang): fix this?
      assert_raises(
          ValueError, lambda: asarray([1.0], dtype=cp.float16)
      )
      assert_raises(OverflowError, lambda: asarray(2**100))
      # Preferably this would be OverflowError
      # assert_raises(OverflowError, lambda: asarray([2**100]))
      #    assert_raises(TypeError, lambda: asarray([2**100]))  # TODO(leofang): fix this?
      assert_raises(
          ValueError, lambda: asarray([1], device="cpu")
      )  # numpy's pick
      assert_raises(ValueError, lambda: asarray([1], device="gpu"))
  
      assert_raises(ValueError, lambda: asarray([1], dtype=int))
      assert_raises(ValueError, lambda: asarray([1], dtype="i"))
      asarray([1], device=Device())
  
imports: from numpy.testing import assert_raises, assert_equal
  import cupy
  from cupy.cuda import Device
  from cupy.array_api import all
  from cupy.array_api._creation_functions import asarray, arange, empty, empty_like, eye, full, full_like, linspace, meshgrid, ones, ones_like, zeros, zeros_like
  from cupy.array_api._dtypes import float32, float64
  from cupy.array_api._array_object import Array
label_desc: Use image node_id 1 for calling a global function with example usage: test_asarray_errors() without return types