human
Complete the below
def make_step_decorator(context, instance, instance_update):

    ''''Factory to create a decorator that records instance progress as a series
    of discrete steps.
    Each time the decorator is invoked we bump the total-step-count, so after::
    @step
    def step1():
    @step
    def step2():
    we have a total-step-count of 2.
    Each time the step-function (not the step-decorator!) is invoked, we bump
    the current-step-count by 1, so after::
    step1()
    the current-step-count would be 1 giving a progress of ``1 / 2 *
    100`` or 50%.'
    '''
assistant
#Here is the Python code you requested.
    step_info = dict(total=0, current=0)
    def bump_progress():
        step_info['current'] += 1
        progress = round(((float(step_info['current']) / step_info['total']) * 100))
        LOG.debug(_('Updating    progress    to    %(progress)d'), locals(), instance=instance)
        instance_update(context, instance['uuid'], {'progress': progress})
    def step_decorator(f):
        step_info['total'] += 1
        @functools.wraps(f)
        def inner(*args, **kwargs):
            rv = f(*args, **kwargs)
            bump_progress()
            return rv
        return inner
    return step_decorator