code: def test_save_mobile_module_with_debug_info_with_trace(self):
      class A(torch.nn.Module):
          def forward(self, x, y):
              return x * y
  
      class B(torch.nn.Module):
          def __init__(self):
              super().__init__()
              self.A0 = A()
              self.A1 = A()
  
          def forward(self, x, y, z):
              return self.A0(x, y) + self.A1(y, z)
  
      for export_method in ["trace", "script"]:
          x = torch.rand((2, 3))
          y = torch.rand((2, 3))
          z = torch.rand((2, 3))
          if export_method == "trace":
              trace_module = torch.jit.trace(B(), [x, y, z])
          else:
              trace_module = torch.jit.script(B())
          exported_module = (
              trace_module._save_to_buffer_for_lite_interpreter(
                  _save_mobile_debug_info=True
              )
          )
          buffer = io.BytesIO(exported_module)
          buffer.seek(0)
  
          assert b"callstack_debug_map.pkl" in exported_module
  
          mobile_module = _load_for_lite_interpreter(buffer)
          with self.assertRaisesRegex(
              RuntimeError,
              r"Module hierarchy:top\(B\)::<unknown>.A0\(A\)::forward.aten::mul",
          ):
              x = torch.rand((2, 3))
              y = torch.rand((8, 10))
              z = torch.rand((8, 10))
              mobile_module(x, y, z)
          with self.assertRaisesRegex(
              RuntimeError,
              r"Module hierarchy:top\(B\)::<unknown>.A1\(A\)::forward.aten::mul",
          ):
              x = torch.rand((2, 3))
              y = torch.rand((2, 3))
              z = torch.rand((8, 10))
              mobile_module(x, y, z)
  
imports: import torch
  import torch.utils.bundled_inputs
  import io
  from tempfile import TemporaryFileName
  from typing import Dict, List
  import inspect
  from torch.testing import FileCheck
  from torch.jit.mobile import _load_for_lite_interpreter, _export_operator_list
  from torch.testing._internal.common_utils import TestCase, run_tests
  from torch.testing._internal.common_quantization import AnnotatedSingleLayerLinearModel, TwoLayerLinearModel, AnnotatedNestedModel
  from torch.testing._internal.common_quantization import QuantizationLiteTestCase
label_desc: Use image node_id 3 for calling the TestLiteScriptModule obj's underlying member method code with example usage: obj.test_save_mobile_module_with_debug_info_with_trace() and returns: unknown, unknown