human
Complete this python program:
def convertkeyerror(func):
assistant
#Here is the Python code you requested.

    """Converts KeyError into InvalidConfigSection.
    """
    def conv(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except KeyError:
            raise InvalidConfigSection(args[1])
    return conv