code: def test_asarray_xarray_intersphinx_workaround():
      # test that the intersphinx workaround in https://github.com/pydata/xarray/issues/4279 works
      module = xr.DataArray.__module__
      try:
          xr.DataArray.__module__ = "xarray"
          y = da.asarray(xr.DataArray([1, 2, 3.0]))
          assert isinstance(y, da.Array)
          assert type(y._meta).__name__ == "ndarray"
          assert_eq(y, y)
      finally:
          xr.DataArray.__module__ = module
  
file_path: dask/dask/array/tests/test_xarray.py
imports: from __future__ import annotations
  import pytest
  import dask.array
  from dask.array.utils import assert_eq
label_desc: Use image node_id 4 for calling a global function with example usage: test_asarray_xarray_intersphinx_workaround() without return types