def _check_magic(handle, bool_return=False):
    """Checks for lif file magic bytes (Private)."""
    if handle.read(4) == b'p\x00\x00\x00':
        return True
    elif not bool_return:
        raise ValueError(
            'This is probably not a LIF file. Expected LIF magic byte at ' +
            str(handle.tell()))
    else:
        return False
