<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_from_known_hosts(self, hosts, known_hosts=DEFAULT_KNOWN_HOSTS, dry=False):
 """ Remove the remote host SSH public key to the `known_hosts` file. :param hosts: the list of the remote `Host` objects. :param known_hosts: the `known_hosts` file to store the SSH public keys. :param dry: perform a dry run. """

        for host in hosts:
            logger.info('[%s] Removing the remote host SSH public key from [%s]...', host.hostname, known_hosts)
            cmd = ['ssh-keygen', '-f', known_hosts, '-R', host.hostname]
            logger.debug('Call: %s', ' '.join(cmd))
            if not dry:
                try:
                    subprocess.check_call(cmd)
                except subprocess.CalledProcessError as ex:
                    logger.error(format_error(format_exception(ex)))