code: def is_logged_in(username=None):
      
      if username:
          if not isinstance(username, (list, tuple)):
              username = [username]
          return 'simple_logged_in' in session and get_username() in username
      return 'simple_logged_in' in session
docs: Checks if user is logged in if `username`
      is passed check if specified user is logged in
      username can be a list