code: def test_out_dtype_op_functional(self):
      class M(torch.nn.Module):
          def __init__(self, weight):
              super().__init__()
              self.weight = weight
  
          def forward(self, x):
              return out_dtype(
                  torch.ops.aten.mm.default, torch.int32, x, self.weight
              )
  
      weight = torch.randint(-128, 127, (5, 5), dtype=torch.int8)
      m = M(weight)
      x = torch.randint(-128, 127, (5, 5), dtype=torch.int8)
      ep = torch._export.export(
          m,
          (x,),
      )
      FileCheck().check("torch.ops.higher_order.out_dtype").check(
          "aten.mm.default"
      ).run(ep.graph_module.code)
      self.assertTrue(torch.allclose(m(x), ep(x)))
      for node in ep.graph.nodes:
          if node.op == "call_function" and node.target is out_dtype:
              # Result of this node should be int32
              self.assertTrue(node.meta["val"].dtype, torch.int32)
              # Argument of this node should be int8
              self.assertTrue(
                  node.args[2].meta["val"].dtype, torch.int8
              )
  
imports: import unittest
  import torch
  import torch._dynamo
  import torch._inductor
  import torch._inductor.decomposition
  import torch._export
  from torch._higher_order_ops.out_dtype import out_dtype
  from torch.fx.experimental.proxy_tensor import make_fx
  from torch.testing._internal.common_utils import run_tests, TestCase, IS_WINDOWS, TEST_WITH_ROCM, IS_FBCODE, IS_REMOTE_GPU, TEST_CUDA
  from torch.testing._internal.common_quantization import skipIfNoDynamoSupport
  from torch.testing import FileCheck
  from torch.testing._internal.common_cuda import SM80OrLater, _get_torch_cuda_version
label_desc: Use image node_id 2 for calling the TestOutDtypeOp obj's underlying member method code with example usage: obj.test_out_dtype_op_functional() and returns: out_dtype