code: def test_linspace(endpoint):
      darr = da.linspace(6, 49, endpoint=endpoint, chunks=5)
      nparr = np.linspace(6, 49, endpoint=endpoint)
      assert_eq(darr, nparr)
  
      darr = da.linspace(1.4, 4.9, endpoint=endpoint, chunks=5, num=13)
      nparr = np.linspace(1.4, 4.9, endpoint=endpoint, num=13)
      assert_eq(darr, nparr)
  
      darr = da.linspace(
          6, 49, endpoint=endpoint, chunks=5, dtype=float
      )
      nparr = np.linspace(6, 49, endpoint=endpoint, dtype=float)
      assert_eq(darr, nparr)
  
      darr, dstep = da.linspace(
          6, 49, endpoint=endpoint, chunks=5, retstep=True
      )
      nparr, npstep = np.linspace(
          6, 49, endpoint=endpoint, retstep=True
      )
      assert np.allclose(dstep, npstep)
      assert_eq(darr, nparr)
  
      darr = da.linspace(
          1.4, 4.9, endpoint=endpoint, chunks=5, num=13, dtype=int
      )
      nparr = np.linspace(
          1.4, 4.9, num=13, endpoint=endpoint, dtype=int
      )
      assert_eq(darr, nparr)
      assert sorted(
          da.linspace(
              1.4, 4.9, endpoint=endpoint, chunks=5, num=13
          ).dask
      ) == sorted(
          da.linspace(
              1.4, 4.9, endpoint=endpoint, chunks=5, num=13
          ).dask
      )
      assert sorted(
          da.linspace(
              6, 49, endpoint=endpoint, chunks=5, dtype=float
          ).dask
      ) == sorted(
          da.linspace(
              6, 49, endpoint=endpoint, chunks=5, dtype=float
          ).dask
      )
  
      x = da.array([0.2, 6.4, 3.0, 1.6])
      nparr = np.linspace(0, 2, 8, endpoint=endpoint)
      darr = da.linspace(
          da.argmin(x), da.argmax(x) + 1, 8, endpoint=endpoint
      )
      assert_eq(darr, nparr)
  
      nparr = np.linspace(0, 0, 0, endpoint=endpoint)
      darr = da.linspace(0, 0, 0, endpoint=endpoint)
      assert_eq(darr, nparr)
  
      nparr = np.linspace(1, 1, 0, endpoint=endpoint)
      darr = da.linspace(1, 1, 0, endpoint=endpoint)
      assert_eq(darr, nparr)
  
      nparr = np.linspace(1, 5, 0, endpoint=endpoint)
      darr = da.linspace(1, 5, 0, endpoint=endpoint)
      assert_eq(darr, nparr)
  
      nparr = np.linspace(0, 0, 1, endpoint=endpoint)
      darr = da.linspace(0, 0, 1, endpoint=endpoint)
      assert_eq(darr, nparr)
  
      nparr = np.linspace(1, 1, 1, endpoint=endpoint)
      darr = da.linspace(1, 1, 1, endpoint=endpoint)
      assert_eq(darr, nparr)
  
      nparr = np.linspace(1, 5, 1, endpoint=endpoint)
      darr = da.linspace(1, 5, 1, endpoint=endpoint)
      assert_eq(darr, nparr)
  
imports: from __future__ import annotations
  import pytest
  import numpy
  import pytest
  from tlz import concat
  import dask
  import dask.array
  from dask.array.core import normalize_chunks
  from dask.array.numpy_compat import AxisError
  from dask.array.utils import assert_eq, same_keys
label_desc: Use image node_id 3 for calling a global function with example usage: test_linspace(endpoint) without return types