code: def test_can_detect_dtype_from_avro_type_nested(
      avro_type, expected_dtype, namespace, nullable
  ):
      avro_type = avro_type if not nullable else ["null", avro_type]
  
      schema_leaf = {
          "name": "leaf",
          "type": "record",
          "fields": [{"name": "prop3", "type": avro_type}],
      }
  
      schema_child = {
          "name": "child",
          "type": "record",
          "fields": [{"name": "prop2", "type": schema_leaf}],
      }
  
      schema_root = {
          "name": "root",
          "type": "record",
          "namespace": namespace,
          "fields": [{"name": "prop1", "type": schema_child}],
      }
  
      actual = cudf_from_avro_util(schema_root, [])
  
      col_name = "{ns}child.{ns}leaf.prop3".format(
          ns="" if namespace is None else namespace + "."
      )
  
      expected = cudf.DataFrame(
          {col_name: cudf.Series(None, None, expected_dtype)}
      )
  
      assert_eq(expected, actual)
  
imports: import datetime
  import io
  import pathlib
  from typing import Optional
  import fastavro
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.testing._utils import assert_eq
  from cudf.testing.dataset_generator import rand_dataframe
label_desc: Use image node_id 3 for calling a global function with example usage: test_can_detect_dtype_from_avro_type_nested(avro_type, expected_dtype, namespace, nullable) without return types