code: def test_assert_eq_sorts():
      df = pd.DataFrame(
          {"A": np.linspace(0, 1, 10), "B": np.random.random(10)}
      )
      df_s = df.sort_values("B")
      assert_eq(df, df_s)
      with pytest.raises(AssertionError):
          assert_eq(df, df_s, sort_results=False)
  
      df_sr = df_s.reset_index(drop=True)
      assert_eq(df, df_sr, check_index=False)
      with pytest.raises(AssertionError):
          assert_eq(df, df_sr)
      with pytest.raises(AssertionError):
          assert_eq(df, df_sr, check_index=False, sort_results=False)
  
      ddf = dd.from_pandas(df, npartitions=2)
      ddf_s = ddf.sort_values(["B"])
      assert_eq(df, ddf_s)
      with pytest.raises(AssertionError):
          assert_eq(df, ddf_s, sort_results=False)
  
      ddf_sr = ddf_s.reset_index(drop=True)
      assert_eq(df, ddf_sr, check_index=False)
      with pytest.raises(AssertionError):
          assert_eq(df, ddf_sr, check_index=False, sort_results=False)
  
imports: from __future__ import annotations
  import re
  import warnings
  from collections.abc import Iterable
  import numpy
  import pandas
  import pytest
  from packaging.version import Version
  import dask
  import dask.dataframe
  from dask.dataframe._compat import PANDAS_GE_200, tm
  from dask.dataframe.core import apply_and_enforce
  from dask.dataframe.utils import UNKNOWN_CATEGORIES, assert_eq, check_matching_columns, check_meta, is_dataframe_like, is_index_like, is_series_like, make_meta, meta_frame_constructor, meta_nonempty, meta_series_constructor, pyarrow_strings_enabled, raise_on_meta_error, shard_df_on_index, valid_divisions
  from dask.local import get_sync
label_desc: Use image node_id 17 for calling a global function with example usage: test_assert_eq_sorts() without return types