code: def test_serialize_pandas_pandas(collection, df2, df2_serializer):
      cudf = pytest.importorskip("cudf")
      pd = pytest.importorskip("pandas")
      dd = pytest.importorskip("dask.dataframe")
      df1 = cudf.DataFrame({"A": [1, 2, None], "B": [1.0, 2.0, None]})
      if df2 is not None:
          df2 = cudf.from_pandas(pd.DataFrame(df2))
      if issubclass(collection, dict):
          header, frames = serialize(
              {"df1": df1, "df2": df2},
              serializers=("cuda", "dask", "pickle"),
          )
      else:
          header, frames = serialize(
              (df1, df2), serializers=("cuda", "dask", "pickle")
          )
      t = deserialize(
          header, frames, deserializers=("cuda", "dask", "pickle")
      )
  
      assert header["is-collection"] is True
      sub_headers = header["sub-headers"]
      assert sub_headers[0]["serializer"] == "cuda"
      assert sub_headers[1]["serializer"] == df2_serializer
      assert isinstance(t, collection)
  
      dd.assert_eq(t["df1"] if isinstance(t, dict) else t[0], df1)
      if df2 is None:
          assert (t["df2"] if isinstance(t, dict) else t[1]) is None
      else:
          dd.assert_eq(t["df2"] if isinstance(t, dict) else t[1], df2)
  
imports: from __future__ import annotations
  import pytest
  from distributed.protocol import deserialize, serialize
label_desc: Use image node_id 2 for calling a global function with example usage: test_serialize_pandas_pandas(collection, df2, df2_serializer) without return types