docstr: Test applying 2 modules consecutively with input/output types
code: def test_chain_with_types(self):
      """Test applying 2 modules consecutively with input/output types"""
      dummy_module = torch.jit.script(DummyModuleWithIOTypes())
      module = torch.jit.script(SimpleLinearWithTypes())
      x = torch.zeros(2, 10)
      result = module(dummy_module(x))
      assert result.shape == (2, 20)
      assert torch.allclose(result, torch.zeros_like(result))
  
imports: from inspect import isclass
  from typing import Any, Type
  import pytest
  import torch
  import torch.nn
  import nemo.core.neural_types.elements
  from nemo.core.classes import Exportable, NeuralModule, typecheck
  from nemo.core.classes.mixins import AdapterModuleMixin
  from nemo.core.neural_types import FloatType, NeuralType, VoidType
label_desc: Use image node_id 7 for calling the TestTorchJitCompatibility obj's underlying member method code with example usage: obj.test_chain_with_types() without return types