code: def test_asarray_errors():
      # Test various protections against incorrect usage
      assert_raises(TypeError, lambda: Array([1]))
      assert_raises(TypeError, lambda: asarray(["a"]))
      assert_raises(
          ValueError, lambda: asarray([1.0], dtype=np.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]))
      asarray([1], device="cpu")  # Doesn't error
      assert_raises(ValueError, lambda: asarray([1], device="gpu"))
  
      assert_raises(ValueError, lambda: asarray([1], dtype=int))
      assert_raises(ValueError, lambda: asarray([1], dtype="i"))
  
file_path: catboost/contrib/python/numpy/py3/numpy/array_api/tests/test_creation_functions.py
imports: from numpy.testing import assert_raises
  import numpy
  from numpy.array_api import all
  from numpy.array_api._creation_functions import asarray, arange, empty, empty_like, eye, full, full_like, linspace, meshgrid, ones, ones_like, zeros, zeros_like
  from numpy.array_api._dtypes import float32, float64
  from numpy.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