docs: def get_port(self, for_protocol):
          '''
              Return (hostname, port number, ssl) pair for the protocol.
              Assuming only one port per host.
          '''
          assert len(for_protocol) == 1, "expect single letter code"
  
          use_ssl = for_protocol in ('s', 'g')
  
          if 'port' in self: return self['hostname'], int(self['port']), use_ssl
  
          rv = next(i for i in self['ports'] if i[0] == for_protocol)
  
          port = None
          if len(rv) >= 2:
              try:
                  port = int(rv[1:])
              except:
                  pass
          port = port or DEFAULT_PORTS[for_protocol]
  
          return self['hostname'], port, use_ssl