def _pad(operand, padding_value, *, padding_config, _in_avals: Sequence[core.AbstractValue], _out_aval: core.AbstractValue):
    del _in_avals
    (low, high, interior) = util.unzip3(padding_config)
    if _enable_xla:
        out = tfxla.pad(operand, padding_value, low, high, interior)
        return out
    if all((((lo >= 0) and (hi >= 0) and (i == 0)) for (lo, hi, i) in padding_config)):
        return tf.pad(operand, util.safe_zip(low, high), mode='CONSTANT', constant_values=padding_value)
    raise _xla_disabled_error('pad', 'Only use cases without interior or negative padding can be converted without XLA.')
def _pad(operand, padding_value, *, padding_config, _in_avals: Sequence[core.AbstractValue], _out_aval: core.AbstractValue):
    del _in_avals
    (low, high, interior) = util.unzip3(padding_config)
    if _enable_xla:
        out = tfxla.pad(operand, padding_value, low, high, interior)
        return out
    if all((((lo >= 0) and (hi >= 0) and (i == 0)) for (lo, hi, i) in padding_config)):
        return tf.pad(operand, util.safe_zip(low, high), mode='CONSTANT', constant_values=padding_value)
    raise _xla_disabled_error('pad', 'Only use cases without interior or negative padding can be converted without XLA.')