def METHOD_NAME(self, conn):
    """
    su options cause the regexes used to vary. This is a mess, requires
    reworking.
    """
    incorrect_pattern = re.compile(
        mitogen.core.b('|').join(
            re.escape(s.encode('utf-8'))
            for s in conn.options.incorrect_prompts
        ),
        re.I
    )
    prompt_pattern = re.compile(
        re.escape(
            conn.options.password_prompt.encode('utf-8')
        ),
        re.I
    )
    self.PATTERNS = mitogen.parent.BootstrapProtocol.PATTERNS + [
        (incorrect_pattern, type(self)._on_password_incorrect),
    ]
    self.PARTIAL_PATTERNS = mitogen.parent.BootstrapProtocol.PARTIAL_PATTERNS + [
        (prompt_pattern, type(self)._on_password_prompt),
    ]