code: def ensure_binary_input(self):
      for _op in self._model.op:
          if _op.type != MaceOp.Eltwise.name:
              continue
          if len(_op.input) != 1:
              continue
          eltwise_type = ConverterUtil.get_arg(
              _op, MaceKeyword.mace_element_type_str
          ).i
          if (
              eltwise_type != EltwiseType.SUM.value
              and eltwise_type != EltwiseType.PROD.value
          ):
              continue
  
          float_value_arg = ConverterUtil.get_arg(
              _op, MaceKeyword.mace_scalar_input_str
          )
          mace_check(
              float_value_arg.f is not None,
              _op.name
              + ": "
              + MaceKeyword.mace_scalar_input_str
              + " value float should not be None",
          )
          scalar = float_value_arg.f
          const_tensor = self._model.tensors.add()
          const_tensor.name = (
              _op.name + "/" + MaceKeyword.mace_scalar_input_str + ":0"
          )
          const_tensor.dims.extend([1])
          const_tensor.data_type = _op.output_type[0]
          if (
              _op.output_type[0] == mace_pb2.DT_UINT8
              or _op.output_type[0] == mace_pb2.DT_INT16
          ):
              const_tensor.scale = scalar
              const_tensor.zero_point = 0
              const_tensor.quantized = True
              const_tensor.int32_data.extend([1])
          elif _op.output_type[0] == mace_pb2.DT_FLOAT:
              const_tensor.float_data.extend([scalar])
          _op.input.extend([const_tensor.name])
          ConverterUtil.del_arg(_op, MaceKeyword.mace_scalar_input_str)
          ConverterUtil.del_arg(
              _op, MaceKeyword.mace_scalar_input_index_str
          )
  
imports: import copy
  import numpy
  from enum import Enum
  from operator import mul
  from py_proto import mace_pb2
  from transform import base_converter
  from transform.base_converter import ConverterUtil
  from transform.base_converter import EltwiseType
  from transform.base_converter import MaceKeyword
  from transform.base_converter import MaceOp
  from transform.base_converter import PaddingMode
  from transform.base_converter import PadType
  from transform.base_converter import PoolingType
  from transform.base_converter import ReduceType
  from transform.base_converter import DataFormat
  from transform.base_converter import FrameworkType
  from utils.util import mace_check
label_desc: Use image node_id 18 for calling the ApuConverter obj's underlying member method code with example usage: obj.ensure_binary_input() without return types