docs: def create_subject(self,
                         authc_token=None,
                         account_id=None,
                         existing_subject=None,
                         subject_context=None):
          """
          Creates a ``Subject`` instance for the user represented by the given method
          arguments.
  
          It is an overloaded method, due to porting java to python, and is
          consequently highly likely to be refactored.
  
          It gets called in one of two ways:
          1) when creating an anonymous subject, passing create_subject
             a subject_context argument
  
          2) following a after successful login, passing all but the context argument
  
          This implementation functions as follows:
  
          - Ensures that the ``SubjectContext`` exists and is as populated as it can be,
            using heuristics to acquire data that may not have already been available
            to it (such as a referenced session or remembered identifiers).
          - Calls subject_context.do_create_subject to perform the Subject
            instance creation
          - Calls subject.save to ensure the constructed Subject's state is
            accessible for future requests/invocations if necessary
          - Returns the constructed Subject instance
  
          :type authc_token:  subject_abcs.AuthenticationToken
  
          :param account_id:  the identifiers of a newly authenticated user
          :type account:  SimpleIdentifierCollection
  
          :param existing_subject: the existing Subject instance that initiated the
                                   authentication attempt
          :type subject:  subject_abcs.Subject
  
          :type subject_context:  subject_abcs.SubjectContext
  
          :returns:  the Subject instance that represents the context and session
                     data for the newly authenticated subject
          """
          if subject_context is None:  # this that means a successful login just happened
              # passing existing_subject is new to yosai:
              context = self.create_subject_context(existing_subject)
  
              context.authenticated = True
              context.authentication_token = authc_token
              context.account_id = account_id
  
              if (existing_subject):
                  context.subject = existing_subject
  
          else:
              context = copy.copy(subject_context)  # if this necessary? TBD.
  
          context = self.ensure_security_manager(context)
          context = self.resolve_session(context)
          context = self.resolve_identifiers(context)
  
          subject = self.do_create_subject(context)  # DelegatingSubject
  
          # save this subject for future reference if necessary:
          # (this is needed here in case remember_me identifiers were resolved
          # and they need to be stored in the session, so we don't constantly
          # re-hydrate the remember_me identifier_collection on every operation).
          self.save(subject)
          return subject