code: def list_or_struct(request, leaf_value):
      if request.param == "list":
          return [[leaf_value], [leaf_value]]
      elif request.param == "struct":
          return {
              "a": leaf_value,
              "b": [leaf_value],
              "c": {"d": [leaf_value]},
          }
      else:
          raise ValueError("Unhandled data type")
  
imports: import functools
  import operator
  import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf import NA
  from cudf._lib.copying import get_element
  from cudf.api.types import is_scalar
  from cudf.testing._utils import DATETIME_TYPES, NUMERIC_TYPES, TIMEDELTA_TYPES, assert_eq
label_desc: Use image node_id 7 for calling a global function with example usage: list_or_struct(request, leaf_value) and returns: list, dict