code: def test_serialize_groupby_sr():
      sr = cudf.Series(np.random.randint(0, 20, 100))
      gb = sr.groupby(sr // 2)
      outgb = gb.deserialize(*gb.serialize())
      got = gb.mean()
      expect = outgb.mean()
      assert_eq(got.sort_index(), expect.sort_index())
  
imports: import pickle
  import msgpack
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.testing import _utils
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 13 for calling a global function with example usage: test_serialize_groupby_sr() without return types