code: def recursive_assert_shape(x, shape):
      if isinstance(x, list) or isinstance(x, tuple):
          for xi in x:
              recursive_assert_shape(xi, shape)
          return
  
      assert x.shape == shape
  
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 1 for calling a global function with example usage: recursive_assert_shape(x, shape) without return types