def METHOD_NAME(self):
    """
    Run the necessary logic for the `sam docs` command
    Raises
    ------
    InvalidDocsCommandException
    """
    if self.docs_command.sub_commands and self.command not in self.docs_command.all_commands:
        raise InvalidDocsCommandException(
            f"Command not found. Try using one of the following available commands:{os.linesep}"
            f"{os.linesep.join([command for command in self.docs_command.get_complete_command_paths()])}"
        )
    browser = BrowserConfiguration()
    documentation = Documentation(browser=browser, command=self.command)
    try:
        documentation.open_docs()
    except BrowserConfigurationError:
        echo(ERROR_MESSAGE.format(URL=documentation.url), err=True)
    else:
        echo(SUCCESS_MESSAGE)