def header_offset(path: str) -> int:
    """Determine the offset required to ignore the header information
    of a PINK binary. The header format spec: lines with a '#' start are
    ignored until a '# END OF HEADER' is found. Only valid at beginning of
    file and 

    Arguments:
        path {str} -- Path to the pink binary file
    
    Returns:
        {int} -- Byte offset position of where the comment at the beginning of
                 the header ends
    """
    with open(path, "rb") as fd:
        for line in fd:
            if not line.startswith(b"#"):
                return 0
            elif line == b"# END OF HEADER":
                return fd.tell()

    raise ValueError("Malformed PINK header: Unbroken Comment Section")