code: def check_serialization(df):
      # basic
      assert_frame_picklable(df)
      # sliced
      assert_frame_picklable(df[:-1])
      assert_frame_picklable(df[1:])
      assert_frame_picklable(df[2:-2])
      # sorted
      sortvaldf = df.sort_values("vals")
      assert isinstance(sortvaldf.index, (GenericIndex, RangeIndex))
      assert_frame_picklable(sortvaldf)
      # out-of-band
      buffers = []
      serialbytes = pickle.dumps(
          df, protocol=5, buffer_callback=buffers.append
      )
      for b in buffers:
          assert isinstance(b, pickle.PickleBuffer)
      loaded = pickle.loads(serialbytes, buffers=buffers)
      assert_eq(loaded, df)
  
file_path: cudf/python/cudf/cudf/tests/test_pickling.py
imports: import pickle
  import numpy
  import pandas
  import pytest
  from cudf import DataFrame, GenericIndex, RangeIndex, Series
  from cudf.core.buffer import as_buffer
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 1 for calling a global function with example usage: check_serialization(df) without return types