human
I wrote the below code

    def decorator(f):
        if ('ticks_between_runs' in kwargs):
            raise exception.InvalidPeriodicTaskArg(arg='ticks_between_runs')
        f._periodic_task = True
        f._periodic_external_ok = kwargs.pop('external_process_ok', False)
        if (f._periodic_external_ok and (not CONF.run_external_periodic_tasks)):
            f._periodic_enabled = False
        else:
            f._periodic_enabled = kwargs.pop('enabled', True)
        f._periodic_spacing = kwargs.pop('spacing', 0)
        if kwargs.pop('run_immediately', False):
            f._periodic_last_run = None
        else:
            f._periodic_last_run = time.time()
        return f
    if kwargs:
        return decorator
    else:
        return decorator(args[0])

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def periodic_task(*args, **kwargs):