code: def test_predispatch_export_with_autograd_op(self):
      class Foo(torch.nn.Module):
          def __init__(self):
              super().__init__()
  
          def forward(self, x):
              with torch.enable_grad():
                  return x + x
  
      with torch.no_grad():
          from torch.export._trace import _export
  
          ep = _export(Foo(), (torch.ones(10),), pre_dispatch=True)
  
      with self.assertRaisesRegex(
          SerializeError, "Failed serializing node _set_grad_enabled"
      ):
          torch.export.save(ep, io.BytesIO())
  
imports: import io
  import pathlib
  import tempfile
  import unittest
  import zipfile
  import torch
  import torch._dynamo
  from torch.export import export, save, load, Dim
  from torch._export.db.case import ExportCase, normalize_inputs, SupportLevel
  from torch._export.db.examples import all_examples
  from torch._export.serde.serialize import ExportedProgramDeserializer, ExportedProgramSerializer, canonicalize, deserialize, serialize, SerializeError
  from torch._subclasses.fake_tensor import FakeTensor
  from torch.fx.experimental.symbolic_shapes import is_concrete_int
  import torch.utils._pytree
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests, TestCase, TemporaryFileName, IS_FBCODE, IS_MACOS, IS_SANDCASTLE, IS_WINDOWS, find_library_location
label_desc: Use image node_id 1 for calling the TestSerialize obj's underlying member method code with example usage: obj.test_predispatch_export_with_autograd_op() and returns: unknown