code: def mm(g: jit_utils.GraphContext, self, other):
      # Create a dummy C tensor. Only needed for API purposes, the value is
      # since beta = 0
      scalar_type = symbolic_helper._try_get_scalar_type(self, other)
      if scalar_type is None:
          raise errors.SymbolicValueError(
              "mm can only operate on tensors with known types", self
          )
      zero_constant = g.op(
          "Constant",
          value_t=torch.tensor([0], dtype=scalar_type.dtype()),
      )
  
      if symbolic_helper._try_get_scalar_type(self):
          (
              old_type,
              self,
              other,
              zero_constant,
          ) = _try_cast_integer_to_float(g, self, other, zero_constant)
          return _cast_to_type(
              g,
              g.op(
                  "Gemm",
                  self,
                  other,
                  zero_constant,
                  beta_f=0.0,
                  alpha_f=1.0,
              ),
              old_type,
          )
      return g.op(
          "Gemm", self, other, zero_constant, beta_f=0.0, alpha_f=1.0
      )
  
imports: import functools
  import warnings
  import torch
  from torch._C import _onnx
  from torch.onnx import _type_utils, errors, symbolic_helper, symbolic_opset9
  from torch.onnx._internal import jit_utils, registration
label_desc: Use image node_id 12 for calling a global function with example usage: mm(g, other) and returns: g, _cast_to_type