code: def recursive_assert_homogeneous_type(x, type_val):
      if isinstance(x, list) or isinstance(x, tuple):
          for xi in x:
              recursive_assert_homogeneous_type(xi, type_val)
          return
  
      assert (
          x.neural_type.compare(type_val)
          == NeuralTypeComparisonResult.SAME
      )
  
imports: from typing import List, NamedTuple
  import pytest
  import torch
  from nemo.core import Typing, typecheck
  from nemo.core.neural_types import *
label_desc: Use image node_id 2 for calling a global function with example usage: recursive_assert_homogeneous_type(x, type_val) without return types