def readAuthorizedKeyFile(fileobj, parseKey=keys.Key.fromString):
    """
    Reads keys from an authorized keys file.  Any non-comment line that cannot
    be parsed as a key will be ignored, although that particular line will
    be logged.

    @param fileobj: something from which to read lines which can be parsed
        as keys
    @type fileobj: L{file}-like object

    @param parseKey: a callable that takes a string and returns a
        L{twisted.conch.ssh.keys.Key}, mainly to be used for testing.  The
        default is L{twisted.conch.ssh.keys.Key.fromString}.
    @type parseKey: L{callable}

    @return: an iterable of L{twisted.conch.ssh.keys.Key}
    @rtype: iterable

    @since: 15.0
    """
    for line in fileobj:
        line = line.strip()
        if line and not line.startswith(b'#'):  # for comments
            try:
                yield parseKey(line)
            except keys.BadKeyError as e:
                log.msg('Unable to parse line "{0}" as a key: {1!s}'
                        .format(line, e))

    Reads keys from an authorized keys file.  Any non-comment line that cannot
    be parsed as a key will be ignored, although that particular line will
    be logged.

    @param fileobj: something from which to read lines which can be parsed
        as keys
    @type fileobj: L{file}-like object

    @param parseKey: a callable that takes a string and returns a
        L{twisted.conch.ssh.keys.Key}, mainly to be used for testing.  The
        default is L{twisted.conch.ssh.keys.Key.fromString}.
    @type parseKey: L{callable}

    @return: an iterable of L{twisted.conch.ssh.keys.Key}
    @rtype: iterable

    @since: 15.0
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/checkers.py