def lookup(self, vid, timeout):
        """ Lookups the passed vid in the o2id-mapping. If not found,
        a InvalidId exception is raised. If found, but the timeout kicks in, a 
        Timeout exception is raised. Otherwise the associated value is returned.
        """
        try:
            o, ts = self.id2o[vid]
            now = time.time()
            if now - ts > timeout:
                raise Timeout()
            self.id2o[vid] = (o, now)
            return o
        except KeyError:
            raise InvalidId()
 Lookups the passed vid in the o2id-mapping. If not found,
        a InvalidId exception is raised. If found, but the timeout kicks in, a 
        Timeout exception is raised. Otherwise the associated value is returned.
        
recipes/Python/359874_xmlrpc_parameter_mapping_OOstyle/recipe-359874.py