code: def _wrap_sessions(sessions, request):
      
      result = set()
      for s in sessions:
          if s is SELF and request:
              result.add(request.session.session_key)
          else:
              result.add(s)
      return result
docs: Returns a list of session keys for the given lists of sessions and/or the session key of the
      current logged in user, if the list contains the magic item SELF.