code: def get_identity(self, subject_id, entities=None):
          
          if not entities:
              entities = self.entities(subject_id)
              if not entities:
                  return {}, []
  
          res = {}
          oldees = []
          for (entity_id, item) in self._cache.get_multi(entities,
                                                      subject_id+'_').items():
              try:
                  info = self.get_info(item)
              except ToOld:
                  oldees.append(entity_id)
                  continue
              for key, vals in info["ava"].items():
                  try:
                      tmp = set(res[key]).union(set(vals))
                      res[key] = list(tmp)
                  except KeyError:
                      res[key] = vals
          return res, oldees
docs: Get all the identity information that has been received and
          are still valid about the subject.
  
          :param subject_id: The identifier of the subject
          :param entities: The identifiers of the entities whoes assertions are
              interesting. If the list is empty all entities are interesting.
          :return: A 2-tuple consisting of the identity information (a
              dictionary of attributes and values) and the list of entities
              whoes information has timed out.