code: def prepare(host, default_protocol='telnet', **kwargs):
      
      host = to_host(host, default_protocol=default_protocol)
      protocol = host.get_protocol()
      conn = create_protocol(protocol, **kwargs)
      if protocol == 'pseudo':
          filename = host.get_address()
          conn.device.add_commands_from_file(filename)
      return conn
docs: Creates an instance of the protocol by either parsing the given
      URL-formatted hostname using :class:`Exscript.util.url`, or according to
      the options of the given :class:`Exscript.Host`.
  
      :type  host: str or Host
      :param host: A URL-formatted hostname or a :class:`Exscript.Host` instance.
      :type  default_protocol: str
      :param default_protocol: Protocol that is used if the URL specifies none.
      :type  kwargs: dict
      :param kwargs: Passed to the protocol constructor.
      :rtype:  Protocol
      :return: An instance of the protocol.