def GetReportFeedback(self, uuid, report_type, **kwargs):
    """Inspect a report and provide a feedback status/command.

    Args:
      uuid: str, computer uuid
      report_type: str, report type
      **kwargs: dict, additional report parameters, e.g:
          on_corp: str, optional, '1' or '0', on_corp status
          message: str, optional, message from client
          details: str, optional, details from client
          ip_address: str, optional, IP address of client
    Returns:
      common.ReportFeedback.* constant
    """
    feedback = {}
    if 'computer' in kwargs:
      c = kwargs['computer']
    else:
      c = models.Computer.get_by_key_name(uuid)
    ip_address = kwargs.get('ip_address', None)
    client_exit = kwargs.get('client_exit', None)

    if client_exit and report_type == 'preflight':
      # client has requested an exit, but let's ensure we should allow it.
      if c is None or c.postflight_datetime is None:
        # client has never fully executed Munki.
        feedback['force_continue'] = True
      else:
        # check if the postflight_datetime warrants a FORCE_CONTINUE
        now = datetime.datetime.utcnow()
        postflight_stale_datetime = now - datetime.timedelta(
            days=FORCE_CONTINUE_POSTFLIGHT_DAYS)
        if c.postflight_datetime < postflight_stale_datetime:
          # client hasn't executed Munki in FORCE_CONTINUE_POSTFLIGHT_DAYS.
          feedback['force_continue'] = True
        else:
          feedback['exit'] = True
    elif report_type == 'preflight':
      if IsExitFeedbackIpAddress(ip_address):
        feedback['exit'] = True
      elif common.IsPanicModeNoPackages():
        feedback['exit'] = True
      elif not c or c.preflight_datetime is None:
        # this is the first preflight post from this client.
        feedback['force_continue'] = True
      elif getattr(c, 'upload_logs_and_notify', None) is not None:
        feedback['logging_level'] = 3
        feedback['upload_logs'] = True
      else:
        # check if preflight_count_since_postflight warrants a repair.
        if (c.preflight_count_since_postflight >=
            REPAIR_CLIENT_PREFLIGHT_COUNT_SINCE_POSTFLIGHT):
          feedback['pkill_installd'] = True
          feedback['pkill_softwareupdated'] = True
          feedback['repair'] = True
          feedback['logging_level'] = 3
          feedback['upload_logs'] = True


    return feedback
dataset/ETHPy150Open google/simian/src/simian/mac/munki/handlers/reports.py/Reports.GetReportFeedback/original