def process_keys(func):
@wraps(func)<EOL>def decorated(self, k, *args):<EOL><INDENT>if not isinstance(k, str):<EOL><INDENT>msg = "<STR_LIT>" % self.__class__.__name__<EOL>raise ValueError(msg)<EOL><DEDENT>if not k.startswith(self.prefix):<EOL><INDENT>k = self.prefix + k<EOL><DEDENT>return func(self, k, *args)<EOL><DEDENT>return decorated<EOL>
Raise error for keys that are not strings
and add the prefix if it is missing