code: def test_linspace_errors():
      linspace(0, 1, 10, device="cpu")  # Doesn't error
      assert_raises(
          ValueError, lambda: linspace(0, 1, 10, device="gpu")
      )
      assert_raises(ValueError, lambda: linspace(0, 1, 10, dtype=float))
      assert_raises(ValueError, lambda: linspace(0, 1, 10, dtype="f"))
  
file_path: numpy/numpy/array_api/tests/test_creation_functions.py
imports: from numpy.testing import assert_raises
  import numpy
  from ..None import all
  from .._creation_functions import asarray, arange, empty, empty_like, eye, full, full_like, linspace, meshgrid, ones, ones_like, zeros, zeros_like
  from .._dtypes import float32, float64
  from .._array_object import Array
label_desc: Use image node_id 9 for calling a global function with example usage: test_linspace_errors() without return types