code: def get_remote_connection_headers(cls, parsed_url, keep_alive=False):
          
  
          system = platform.system().lower()
          if system == "darwin":
              system = "mac"
  
          headers = {
              'Accept': 'application/json',
              'Content-Type': 'application/json;charset=UTF-8',
              'User-Agent': 'selenium/{} (python {})'.format(__version__, system)
          }
  
          if parsed_url.username:
              base64string = base64.b64encode('{0.username}:{0.password}'.format(parsed_url).encode())
              headers.update({
                  'Authorization': 'Basic {}'.format(base64string.decode())
              })
  
          if keep_alive:
              headers.update({
                  'Connection': 'keep-alive'
              })
  
          return headers
docs: Get headers for remote request.
  
          :Args:
           - parsed_url - The parsed url
           - keep_alive (Boolean) - Is this a keep-alive connection (default: False)