code: def test_computed_table_with_autograd(self):
      global_m = C._dispatch_library("IMPL", "_", "AutogradCPU")
      result = self.commute(
          "foo",
          [
              # m.def("foo(Tensor x) -> Tensor")
              lambda m: m.def_("foo(Tensor x) -> Tensor"),
              # m.impl("foo", torch::kAutograd, [](const Tensor & x) { return x })
              lambda m: m.impl_t_t("foo", "Autograd"),
          ],
      )
      state, table = result.state, result.table
      self.assertExpectedInline(
          state,
          """\
  name: test::foo
  schema: test::foo(Tensor x) -> Tensor
  debug: registered at /dev/null:0
  alias analysis kind: FROM_SCHEMA
  Autograd[alias]: impl_t_t :: (Tensor _0) -> Tensor _0 [ boxed unboxed ]
  """,
      )
  
      # computed dispatch table is too big, so we only check on a few entries we're interested in.
      extracted_table = extract_dispatch_table_with_keys(
          table, dispatch_keys_to_check
      )
  
      self.assertExpectedInline(
          extracted_table,
          """\
  AutogradOther: impl_t_t [autograd kernel]
  AutogradCPU: impl_t_t [autograd kernel]
  AutogradCUDA: impl_t_t [autograd kernel]
  AutogradXLA: impl_t_t [autograd kernel]
  """,
      )
  
imports: import torch._C
  from torch.testing._internal.common_utils import TestCase, run_tests
  from torch._python_dispatcher import PythonDispatcher
  from collections import namedtuple
  import itertools
  import os
  import re
  import torch.utils.cpp_extension
label_desc: Use image node_id 13 for calling the TestDispatch obj's underlying member method code with example usage: obj.test_computed_table_with_autograd() without return types