human
Complete this python program:
def _FloatDecoder():
assistant
#Here is the Python code you requested.

    """Returns a decoder for a float field.
    This code works around a bug in struct.unpack for non-finite 32-bit
    floating-point values.
    """
    local_unpack = struct.unpack
    def InnerDecode(buffer, pos):
        new_pos = (pos + 4)
        float_bytes = buffer[pos:new_pos]
        if ((float_bytes[3] in '\x7f\xff') and (float_bytes[2] >= '\x80')):
            if (float_bytes[0:3] != '\x00\x00\x80'):
                return (_NAN, new_pos)
            if (float_bytes[3] == '\xff'):
                return (_NEG_INF, new_pos)
            return (_POS_INF, new_pos)
        result = local_unpack('<f', float_bytes)[0]
        return (result, new_pos)
    return _SimpleDecoder(wire_format.WIRETYPE_FIXED32, InnerDecode)