code: def outer(g: jit_utils.GraphContext, input, other):
      # make sure to cast other to self's type
      if _type_utils.JitScalarType.from_value(
          other, _type_utils.JitScalarType.UNDEFINED
      ) != _type_utils.JitScalarType.from_value(input):
          other = g.op(
              "Cast",
              other,
              to_i=_type_utils.JitScalarType.from_value(
                  input
              ).onnx_type(),
          )
      return _einsum_helper(g, "i,j->ij", [input, other])
  
imports: from __future__ import annotations
  import functools
  import sys
  from typing import Optional, Tuple
  import torch
  from torch._C import _onnx
  from torch.onnx import _type_utils, errors, symbolic_helper, symbolic_opset9, utils
  from torch.onnx._internal import _beartype, jit_utils, registration
label_desc: Use image node_id 3 for calling a global function with example usage: outer(g, input, other) and returns: _einsum_helper