code: def get(self, name_id, entity_id, check_not_on_or_after=True):
          
          cni = code(name_id)
          (timestamp, info) = self._db[cni][entity_id]
          info = info.copy()
          if check_not_on_or_after and time_util.after(timestamp):
              raise ToOld("past %s" % str(timestamp))
  
          if 'name_id' in info and isinstance(info['name_id'], six.string_types):
              info['name_id'] = decode(info['name_id'])
          return info or None
docs: Get session information about a subject gotten from a
          specified IdP/AA.
  
          :param name_id: The subject identifier, a NameID instance
          :param entity_id: The identifier of the entity_id
          :param check_not_on_or_after: if True it will check if this
               subject is still valid or if it is too old. Otherwise it
               will not check this. True by default.
          :return: The session information