code: def _ExtractRequestSummaryFields(self, request, error=None):
      
      headers = request.headers
      summary_fields = {
          'server': request.get_full_url(),
          'contentRange': headers['Content-range'],
          'contentLength': headers['Content-length']
      }
  
      if error:
        summary_fields['isError'] = True
        summary_fields['errorMessage'] = error.reason
      else:
        summary_fields['isError'] = False
  
      return summary_fields
docs: Extract fields used in the summary logs.
  
      Args:
        request:  a urllib2.Request instance configured to make the request.
        [optional]
        error: a urllib2.HttpError instance used to retrieve error details.
  
      Returns:
        A dict containing the fields to be output in the summary logs.