docs: def _get_subject(self):
          """
          Returns the currently accessible Subject available to the calling code
          depending on runtime environment.
  
          :param web_registry:  The WebRegistry instance that knows how to interact
                                with the web application's request and response APIs
  
          :returns: the Subject currently accessible to the calling code
          """
          web_registry = WebYosai.get_current_webregistry()
          subject_context = WebSubjectContext(yosai=self,
                                              security_manager=self.security_manager,
                                              web_registry=web_registry)
          subject = self.security_manager.create_subject(subject_context=subject_context)
  
          if not hasattr(subject, 'web_registry'):
              msg = ("Subject implementation returned from the SecurityManager"
                     "was not a WebSubject implementation.  Please ensure a "
                     "Web-enabled SecurityManager has been configured and made"
                     "available to this builder.")
              raise AttributeError(msg)
  
          return subject