code: def test_pyarrow_schema_dispatch(preserve_index):
      from dask.dataframe.dispatch import (
          pyarrow_schema_dispatch,
          to_pyarrow_table_dispatch,
      )
  
      df = cudf.DataFrame(np.random.randn(10, 3), columns=list("abc"))
      df["d"] = cudf.Series(["cat", "dog"] * 5)
      table = to_pyarrow_table_dispatch(
          df, preserve_index=preserve_index
      )
      schema = pyarrow_schema_dispatch(
          df, preserve_index=preserve_index
      )
  
      assert schema.equals(table.schema)
  
file_path: cudf/python/dask_cudf/dask_cudf/tests/test_dispatch.py
imports: import numpy
  import pandas
  import pytest
  from dask.base import tokenize
  from dask.dataframe import assert_eq
  from dask.dataframe.methods import is_categorical_dtype
  import cudf
label_desc: Use image node_id 4 for calling a global function with example usage: test_pyarrow_schema_dispatch(preserve_index) without return types