def METHOD_NAME(
    self,
    cmd: str = "enable",
    pattern: str = "password",
    enable_pattern: Optional[str] = None,
    check_state: bool = True,
    re_flags: int = re.IGNORECASE,
    default_username: str = "",
) -> str:
    """Enter enable mode"""
    if check_state and self.check_enable_mode():
        return ""
    if not default_username:
        default_username = self.username
    output = ""
    username_pattern = r"(username|login|user name)"
    pwd_pattern = pattern
    prompt_pattern = r"[>#]"
    full_pattern = rf"(username|login|user name|{pwd_pattern}|{prompt_pattern})"
    # Send the enable command
    self.write_channel(cmd + self.RETURN)
    new_output = self.read_until_pattern(
        full_pattern, read_timeout=15, re_flags=re_flags
    )
    # Send the username
    if re.search(username_pattern, new_output, flags=re_flags):
        output += new_output
        self.write_channel(default_username + self.RETURN)
        full_pattern = rf"({pwd_pattern}|{prompt_pattern})"
        new_output = self.read_until_pattern(
            full_pattern, read_timeout=15, re_flags=re_flags
        )
    # Send the password
    if re.search(pwd_pattern, new_output, flags=re_flags):
        output += new_output
        self.write_channel(self.secret + self.RETURN)
        new_output = self.read_until_pattern(
            prompt_pattern, read_timeout=15, re_flags=re_flags
        )
    output += new_output
    log.debug(f"{output}")
    self.clear_buffer()
    msg = (
        "Failed to enter enable mode. Please ensure you pass "
        "the 'secret' argument to ConnectHandler."
    )
    if not self.check_enable_mode():
        raise ValueError(msg)
    return output