code: def test_serialize_string_check_buffer_sizes():
      df = cudf.DataFrame({"a": ["a", "b", "cd", None]})
      expect = df.memory_usage(deep=True).loc["a"]
      header, frames = df.serialize()
      got = sum(b.nbytes for b in frames)
      assert expect == got
  
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 21 for calling a global function with example usage: test_serialize_string_check_buffer_sizes() without return types