code: def commute(self, name, ops, ctor_order=None, expect_raises=False):
      results = {}
  
      def go(ctor_order):
          for dtor_order in itertools.permutations(range(len(ops))):
              self.run_ops(
                  name,
                  ops,
                  ctor_order,
                  dtor_order,
                  results=results,
                  expect_raises=expect_raises,
              )
  
      if ctor_order is not None:
          go(ctor_order)
      else:
          for ctor_order in itertools.permutations(range(len(ops))):
              go(ctor_order)
  
      # Return the "full" Result namedtuple after all operations are run.
      # If this KeyErrors, that means that there did not exist any
      # ordering of ctors which got us to the "end".  That's an
      # error in test construction: it means you could have
      # factored the test into two smaller ones.
      return results[frozenset(range(len(ops)))]
  
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 3 for calling the TestDispatch obj's underlying member method code with example usage: obj.commute(name, ops, ctor_order, expect_raises) and returns: results