parameters: (self, params, **kwargs)
docstring: Hoist a header to the hostname.
  
          Hoist a header to the beginning of the hostname with a suffix "." after
          it. The original header should be removed from the header map. This
          method is intended to be used as a target for the before-call event.
docstring_summary: Hoist a header to the hostname.
docstring_tokens: Hoist a header to the hostname .
function: def hoist(self, params, **kwargs):
          """Hoist a header to the hostname.
  
          Hoist a header to the beginning of the hostname with a suffix "." after
          it. The original header should be removed from the header map. This
          method is intended to be used as a target for the before-call event.
          """
          if self._header_name not in params['headers']:
              return
          header_value = params['headers'][self._header_name]
          self._ensure_header_is_valid_host(header_value)
          original_url = params['url']
          new_url = self._prepend_to_host(original_url, header_value)
          params['url'] = new_url
function_tokens: def hoist ( self , params , * * kwargs ) : if self . _header_name not in params [ 'headers' ] : return header_value = params [ 'headers' ] [ self . _header_name ] self . _ensure_header_is_valid_host ( header_value ) original_url = params [ 'url' ] new_url = self . _prepend_to_host ( original_url , header_value ) params [ 'url' ] = new_url