code: def _handle_consent_response(self, context):
          
          consent_state = context.state[STATE_KEY]
          saved_resp = consent_state["internal_resp"]
          internal_response = InternalData.from_dict(saved_resp)
  
          hash_id = self._get_consent_id(internal_response.requester, internal_response.subject_id,
                                         internal_response.attributes)
  
          try:
              consent_attributes = self._verify_consent(hash_id)
          except ConnectionError as e:
              satosa_logging(logger, logging.ERROR,
                             "Consent service is not reachable, no consent given.", context.state)
              # Send an internal_response without any attributes
              consent_attributes = None
  
          if consent_attributes is None:
              satosa_logging(logger, logging.INFO, "Consent was NOT given", context.state)
              # If consent was not given, then don't send any attributes
              consent_attributes = []
          else:
              satosa_logging(logger, logging.INFO, "Consent was given", context.state)
  
          internal_response.attributes = self._filter_attributes(internal_response.attributes, consent_attributes)
          return self._end_consent(context, internal_response)
docs: Endpoint for handling consent service response
          :type context: satosa.context.Context
          :rtype: satosa.response.Response
  
          :param context: response context
          :return: response