code: def convert_response(check_response, project_id):
      
      if not check_response or not check_response.checkErrors:
          return _IS_OK
  
      # only check the first error for now, as per ESP
      theError = check_response.checkErrors[0]
      error_tuple = _CHECK_ERROR_CONVERSION.get(theError.code, _IS_UNKNOWN)
      if error_tuple[1].find(u'{') == -1:  # no replacements needed:
          return error_tuple
  
      updated_msg = error_tuple[1].format(project_id=project_id, detail=theError.detail or u'')
      return error_tuple[0], updated_msg, error_tuple[2]
docs: Computes a http status code and message `CheckResponse`
  
      The return value a tuple (code, message, api_key_is_bad) where
  
      code: is the http status code
      message: is the message to return
      api_key_is_bad: indicates that a given api_key is bad
  
      Args:
         check_response (:class:`endpoints_management.gen.servicecontrol_v1_messages.CheckResponse`):
           the response from calling an api
  
      Returns:
         tuple(code, message, bool)