code: def soap_fault(message=None, actor=None, code=None, detail=None):
      
      _string = _actor = _code = _detail = None
  
      if message:
          _string = soapenv.Fault_faultstring(text=message)
      if actor:
          _actor = soapenv.Fault_faultactor(text=actor)
      if code:
          _code = soapenv.Fault_faultcode(text=code)
      if detail:
          _detail = soapenv.Fault_detail(text=detail)
  
      fault = soapenv.Fault(
          faultcode=_code,
          faultstring=_string,
          faultactor=_actor,
          detail=_detail,
      )
  
      return "%s" % fault
docs: Create a SOAP Fault message
  
      :param message: Human readable error message
      :param actor: Who discovered the error
      :param code: Error code
      :param detail: More specific error message
      :return: A SOAP Fault message as a string