code: def test_nested_input_output_neural_types_ignore_collections(self):
      class NestedNodeA(Typing):
          @property
          def input_types(self):
              return {"x": NeuralType(("B",), ElementType())}
  
          @property
          def output_types(self):
              return {
                  "y0": NeuralType(("B", "D"), LogitsType()),
                  "y1": NeuralType(("B", "D"), LogitsType()),
              }
  
          @typecheck(ignore_collections=True)
          def __call__(self, x):
              # input x = [[x1, x2], [x3]]
              x0 = x[0][0]
              y = torch.randn(x0.shape[0], 4)
              return [[y, y], [y]]
  
      # Non-homogeneous output types
      class NestedNodeB(Typing):
          @property
          def input_types(self):
              return {"w": NeuralType(("B", "D"), LogitsType())}
  
          @property
          def output_types(self):
              return {
                  "u0": NeuralType(
                      ("B",), LogprobsType()
                  ),  # check non homogeneous type
                  "u1": NeuralType(("B",), LabelsType()),
              }
  
          @typecheck(ignore_collections=True)
          def __call__(self, w):
              # input x = [[x1, x2], [x3]]
              _, u00 = w[0][0].max(-1)
              _, u01 = w[0][1].max(-1)
              _, u10 = w[1][0].max(-1)
              return [[u00, u01], [u10]]
  
      nodeA = NestedNodeA()
      nodeB = NestedNodeB()
  
      input_nest = [
          [torch.zeros(10), torch.zeros(10)],
          [torch.zeros(10)],
      ]
      outA = nodeA(x=input_nest)
      outB = nodeB(w=outA)
  
      # Perform recursive shape assert
      recursive_assert_shape(outB, torch.Size([10]))
  
      # Assert non-homogeneous type assertions
      assert (
          outB[0][0].neural_type.compare(
              NeuralType(("B",), LogprobsType())
          )
          == NeuralTypeComparisonResult.SAME
      )
      assert (
          outB[0][1].neural_type.compare(
              NeuralType(("B",), LogprobsType())
          )
          == NeuralTypeComparisonResult.SAME
      )
      assert (
          outB[1][0].neural_type.compare(
              NeuralType(("B",), LabelsType())
          )
          == 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 19 for calling the TestNeuralTypeCheckSystem obj's underlying member method code with example usage: obj.test_nested_input_output_neural_types_ignore_collections() and returns: dict, dict, list, dict, dict, list