code: def promote_types_onnx(
      type1: Union[ivy.Dtype, ivy.NativeDtype],
      type2: Union[ivy.Dtype, ivy.NativeDtype],
      /,
  ) -> ivy.Dtype:
      """Promote the datatypes type1 and type2, returning the data type they
      promote to.
  
      Parameters
      ----------
      type1
          the first of the two types to promote
      type2
          the second of the two types to promote
  
      Returns
      -------
      ret
          The type that both input types promote to
      """
      try:
          ret = onnx_promotion_table[
              (ivy.as_ivy_dtype(type1), ivy.as_ivy_dtype(type2))
          ]
      except KeyError as e:
          raise ivy.utils.exceptions.IvyException(
              "these dtypes are not type promotable"
          ) from e
      return ret
  
file_path: ivy/ivy/functional/frontends/onnx/__init__.py
imports: import ivy
  from ivy.utils.exceptions import handle_exceptions
  from numbers import Number
  from typing import Union, Tuple, Iterable
  from .None import helper
  from .None import tensor
  from .tensor import *
  from .None import elementwise
  from .elementwise import *
  from .None import linalg
  from .linalg import *
label_desc: Use image node_id 1 for calling a global function with example usage: promote_types_onnx() and returns: ret