def METHOD_NAME(self, plugin_info):
    """Close the communication channel
    :param plugin_info: Context information for plugin
    :type plugin_info: `dict`
    :return: None
    :rtype: None
    """
    if self.connection is None:
        logging.info("Close: Connection already closed")
        return False
    if "CommandsBeforeExit" in self.options and self.options["CommandsBeforeExit"]:
        logging.info("Running commands before closing Communication Channel..")
        self.run_cmd_list(
            self.options["CommandsBeforeExit"].split(
                self.options["CommandsBeforeExitDelim"]
            ),
            plugin_info,
        )
    logging.info("Trying to close Communication Channel..")
    self.run("exit", plugin_info)
    if "ExitMethod" in self.options and self.options["ExitMethod"] == "kill":
        self.kill()
    else:  # By default wait
        self.wait()