human
I wrote the below code

    def decorator(function):
        'Set    up    the    decorator    function.'
        def wrapper(self, **kwargs):
            'Wrap    a    group    state    change.'
            from limitlessled.pipeline import Pipeline
            pipeline = Pipeline()
            transition_time = DEFAULT_TRANSITION
            if self.repeating:
                self.repeating = False
                self.group.stop()
            if ((not self.is_on) and (new_state is True)):
                pipeline.on()
            if (ATTR_TRANSITION in kwargs):
                transition_time = int(kwargs[ATTR_TRANSITION])
            function(self, transition_time, pipeline, **kwargs)
            self._is_on = new_state
            self.group.enqueue(pipeline)
            self.schedule_update_ha_state()
        return wrapper
    return decorator

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

def state(new_state):