code: def _authn_context_class_ref(authn_class, authn_auth=None):
      
      cntx_class = factory(saml.AuthnContextClassRef, text=authn_class)
      if authn_auth:
          return factory(saml.AuthnContext,
                         authn_context_class_ref=cntx_class,
                         authenticating_authority=factory(
                             saml.AuthenticatingAuthority, text=authn_auth))
      else:
          return factory(saml.AuthnContext,
                         authn_context_class_ref=cntx_class)
docs: Construct the authn context with a authn context class reference
      :param authn_class: The authn context class reference
      :param authn_auth: Authenticating Authority
      :return: An AuthnContext instance