code: def test_loc():
      assert d.loc[3:8].divisions[0] == 3
      assert d.loc[3:8].divisions[-1] == 8
  
      assert d.loc[5].divisions == (5, 5)
  
      assert_eq(d.loc[5], full.loc[5:5])
      assert_eq(d.loc[3:8], full.loc[3:8])
      assert_eq(d.loc[:8], full.loc[:8])
      assert_eq(d.loc[3:], full.loc[3:])
      assert_eq(d.loc[[5]], full.loc[[5]])
  
      assert_eq(d.a.loc[5], full.a.loc[5:5])
      assert_eq(d.a.loc[3:8], full.a.loc[3:8])
      assert_eq(d.a.loc[:8], full.a.loc[:8])
      assert_eq(d.a.loc[3:], full.a.loc[3:])
      assert_eq(d.a.loc[[5]], full.a.loc[[5]])
      assert_eq(d.a.loc[[]], full.a.loc[[]])
      assert_eq(d.a.loc[np.array([])], full.a.loc[np.array([])])
  
      pytest.raises(KeyError, lambda: d.loc[1000])
      assert_eq(d.loc[1000:], full.loc[1000:])
      assert_eq(d.loc[1000:2000], full.loc[1000:2000])
      assert_eq(d.loc[:-1000], full.loc[:-1000])
      assert_eq(d.loc[-2000:-1000], full.loc[-2000:-1000])
  
      assert sorted(d.loc[5].dask) == sorted(d.loc[5].dask)
      assert sorted(d.loc[5].dask) != sorted(d.loc[6].dask)
  
imports: from __future__ import annotations
  import contextlib
  import numpy
  import pandas
  import pytest
  import dask
  import dask.dataframe
  from dask.base import tokenize
  from dask.dataframe._compat import PANDAS_GE_210, PANDAS_GE_220, IndexingError, tm
  from dask.dataframe.indexing import _coerce_loc_index
  from dask.dataframe.utils import assert_eq, make_meta, pyarrow_strings_enabled
label_desc: Use image node_id 1 for calling a global function with example usage: test_loc() without return types