code: def _construct_full_hostname(self, hostname):
          
          if hostname.startswith(('http://', 'https://', )):
              return hostname
          if '://' in hostname:
              protocol, host = hostname.split('://', 1)
              raise ValueError('Protocol %s is not supported.' % protocol)
          return '://'.join([self.default_scheme, hostname, ])
docs: Create a full (scheme included) hostname from the argument given.
  
          Only HTTP and HTTP+SSL protocols are allowed.
  
          Args:
              hostname: The hostname to use.
          Returns:
              The full hostname.
          Raises:
              ValueError: A not supported protocol is used.