@staticmethod
def _skip_useless_lines(sequence):
    """Yields only lines that do not begin with '#'.

        Also skips any blank lines at the beginning of the input.
        """
    at_beginning = True
    for line in sequence:
        if isinstance(line, bytes):
            if line.startswith(b'#'):
                continue
        elif line.startswith('#'):
            continue
        if at_beginning:
            if isinstance(line, bytes):
                if not line.rstrip(b'\r\n'):
                    continue
            elif not line.rstrip('\r\n'):
                continue
            at_beginning = False
        yield line
