<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def option_hook(self, function):
 """ Decorator for adding an option hook function. An option hook is a function that is called right before a run is created. It receives (and potentially modifies) the options dictionary. That is, the dictionary of commandline options used for this run. .. note:: The decorated function MUST have an argument called options. The options also contain ``'COMMAND'`` and ``'UPDATE'`` entries, but changing them has no effect. Only modification on flags (entries starting with ``'--'``) are considered. """

        sig = Signature(function)
        if "options" not in sig.arguments:
            raise KeyError("option_hook functions must have an argument called"
                           " 'options', but got {}".format(sig.arguments))
        self.option_hooks.append(function)
        return function