code: def test_struct_explode():
      s = cudf.Series([], dtype=cudf.StructDtype({}))
      expect = cudf.DataFrame({})
      assert_eq(expect, s.struct.explode())
  
      s = cudf.Series(
          [
              {"a": 1, "b": "x"},
              {"a": 2, "b": "y"},
              {"a": 3, "b": "z"},
              {"a": 4, "b": "a"},
          ]
      )
      expect = cudf.DataFrame(
          {"a": [1, 2, 3, 4], "b": ["x", "y", "z", "a"]}
      )
      got = s.struct.explode()
      assert_eq(expect, got)
  
      # check that a copy was made:
      got["a"][0] = 5
      assert_eq(s.struct.explode(), expect)
  
imports: import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf.core.dtypes import StructDtype
  from cudf.testing._utils import DATETIME_TYPES, TIMEDELTA_TYPES, assert_eq
label_desc: Use image node_id 12 for calling a global function with example usage: test_struct_explode() without return types