def _argminmax(fn, operand, axes, index_dtype):
    (axis,) = axes
    output_type = tf.int32
    if (dtypes.iinfo(index_dtype).bits > 32):
        output_type = tf.int64
    result = fn(operand, axis=axis, output_type=output_type)
    return tf.cast(result, to_tf_dtype(index_dtype))
def _argminmax(fn, operand, axes, index_dtype):
    (axis,) = axes
    output_type = tf.int32
    if (dtypes.iinfo(index_dtype).bits > 32):
        output_type = tf.int64
    result = fn(operand, axis=axis, output_type=output_type)
    return tf.cast(result, to_tf_dtype(index_dtype))