code: def get_binary_types(expr, type_map):
      """Get Affine types of a binary op's inputs and unify them"""
      # Support the case where one input is quantized and the other is a constant float
      left = expr.args[0]
      right = expr.args[1]
      left_t = None
      right_t = None
  
      if left in type_map:
          left_t = type_map[left]
      if right in type_map:
          right_t = type_map[right]
  
      out_t = type_map[expr]
      if left_t is None and right_t is None:
          raise TypeError("neither input is quantized!")
      if left_t is None:
          assert isinstance(left, relay.expr.Constant)
          left = relay.qnn.op.quantize(
              left,
              right_t.scale,
              right_t.zero_point,
              out_dtype=right_t.dtype,
          )
          left_t = right_t
      if right_t is None:
          assert isinstance(right, relay.expr.Constant)
          right = relay.qnn.op.quantize(
              right,
              left_t.scale,
              left_t.zero_point,
              out_dtype=left_t.dtype,
          )
          right_t = left_t
  
      # Handle the case of mismatched inputs
      if not left_t.dtype == out_t.dtype:
          out_t = left_t
  
      return left, right, left_t, right_t, out_t
  
imports: import numpy
  import tvm
  from tvm import relay
  from tvm.ir import TensorAffineType, TupleAffineType
  from tvm.relay.qnn.op import canonicalizations
  from tvm.tir import bijective_layout
  from ..op import register_fake_quantization_to_integer, register_optional_fake_quantization_to_integer
label_desc: Use image node_id 25 for calling a global function with example usage: get_binary_types(expr, type_map) and returns: left,  right,  left_t,  right_t,  out_t