def METHOD_NAME(self, items: list[tuple[Any, int]]) -> defer.Deferred:
    """
    Convert a list of PAM authentication questions into a
    MSG_USERAUTH_INFO_REQUEST.  Returns a Deferred that will be called
    back when the user has responses to the questions.
    @param items: a list of 2-tuples (message, kind).  We only care about
        kinds 1 (password) and 2 (text).
    @type items: C{list}
    @rtype: L{defer.Deferred}
    """
    resp = []
    for message, kind in items:
        if kind == 1:  # Password
            resp.append((message, 0))
        elif kind == 2:  # Text
            resp.append((message, 1))
        elif kind in (3, 4):
            return defer.fail(error.ConchError("cannot handle PAM 3 or 4 messages"))
        else:
            return defer.fail(error.ConchError(f"bad PAM auth kind {kind}"))
    packet = NS(b"") + NS(b"") + NS(b"")
    packet += struct.pack(">L", len(resp))
    for prompt, echo in resp:
        packet += NS(prompt)
        packet += bytes((echo,))
    self.transport.sendPacket(userauth.MSG_USERAUTH_INFO_REQUEST, packet)  # type: ignore
    self._pamDeferred = defer.Deferred()
    return self._pamDeferred