code: def _status_response(self, response_class, issuer, status, sign=False,
                           sign_alg=None, digest_alg=None,
                           **kwargs):
          
  
          mid = sid()
  
          for key in ["binding"]:
              try:
                  del kwargs[key]
              except KeyError:
                  pass
  
          if not status:
              status = success_status_factory()
  
          response = response_class(issuer=issuer, id=mid, version=VERSION,
                                    issue_instant=instant(),
                                    status=status, **kwargs)
  
          if sign:
              return self.sign(response, mid, sign_alg=sign_alg,
                               digest_alg=digest_alg)
          else:
              return response
docs: Create a StatusResponse.
  
          :param response_class: Which subclass of StatusResponse that should be
              used
          :param issuer: The issuer of the response message
          :param status: The return status of the response operation
          :param sign: Whether the response should be signed or not
          :param kwargs: Extra arguments to the response class
          :return: Class instance or string representation of the instance