substitute the '%s' with table and list containing key, respectively. define the method has_key with self class instance, key and version defaulting to None as arguments.
def has_key ( self , key , version = None ) :