<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_logged_in(self, name_id):
 """ Check if user is in the cache :param name_id: The identifier of the subject """

        identity = self.users.get_identity(name_id)[0]
        return bool(identity)