'Return a set of Set-Cookie headers; when set into a response,
these headers will represent a valid authentication ticket.
``max_age``
The max age of the auth_tkt cookie, in seconds.  When this value is
set, the cookie\'s ``Max-Age`` and ``Expires`` settings will be set,
allowing the auth_tkt cookie to last between browser sessions.  If
this value is ``None``, the ``max_age`` value provided to the
helper itself will be used as the ``max_age`` value.  Default:
``None``.
``tokens``
A sequence of strings that will be placed into the auth_tkt tokens
field.  Each string in the sequence must be of the Python ``str``
type and must match the regex ``^[A-Za-z][A-Za-z0-9+_-]*$``.
Tokens are available in the returned identity when an auth_tkt is
found in the request and unpacked.  Default: ``()``.'

def remember(self, request, userid, max_age=None, tokens=()):

    max_age = (self.max_age if (max_age is None) else int(max_age))
    environ = request.environ
    if self.include_ip:
        remote_addr = environ['REMOTE_ADDR']
    else:
        remote_addr = '0.0.0.0'
    user_data = ''
    encoding_data = self.userid_type_encoders.get(type(userid))
    if encoding_data:
        (encoding, encoder) = encoding_data
    else:
        warnings.warn('userid    is    of    type    {},    and    is    not    supported    by    the    AuthTktAuthenticationPolicy.    Explicitly    converting    to    string    and    storing    as    base64.    Subsequent    requests    will    receive    a    string    as    the    userid,    it    will    not    be    decoded    back    to    the    type    provided.'.format(type(userid)), RuntimeWarning)
        (encoding, encoder) = self.userid_type_encoders.get(text_type)
        userid = str(userid)
    userid = encoder(userid)
    user_data = ('userid_type:%s' % encoding)
    new_tokens = []
    for token in tokens:
        if isinstance(token, text_type):
            try:
                token = ascii_native_(token)
            except UnicodeEncodeError:
                raise ValueError(('Invalid    token    %r' % (token,)))
        if (not (isinstance(token, str) and VALID_TOKEN.match(token))):
            raise ValueError(('Invalid    token    %r' % (token,)))
        new_tokens.append(token)
    tokens = tuple(new_tokens)
    if hasattr(request, '_authtkt_reissued'):
        request._authtkt_reissue_revoked = True
    ticket = self.AuthTicket(self.secret, userid, remote_addr, tokens=tokens, user_data=user_data, cookie_name=self.cookie_name, secure=self.secure, hashalg=self.hashalg)
    cookie_value = ticket.cookie_value()
    return self._get_cookies(request, cookie_value, max_age)
