code: def nested_list(request, list_or_struct, leaf_value):
      if request.param == "list":
          return [list_or_struct, list_or_struct]
      elif request.param == "struct":
          return [
              {
                  "a": list_or_struct,
                  "b": leaf_value,
                  "c": {"d": list_or_struct, "e": 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 8 for calling a global function with example usage: nested_list(request, list_or_struct, leaf_value) and returns: list, list