def METHOD_NAME(f, endian):
    """Read a 4-Byte floating point from file f
    with a given endianness (byte order).
    endian can be either 'big' or 'little'.
    """
    if (endian != "little") and (endian != "big"):
        _logger.debug("File address:", f.tell())
        raise ByteOrderError(endian)
    else:
        data = f.read(4)
        if endian == "big":
            s = B_float
        elif endian == "little":
            s = L_float
        return s.unpack(data)[0]