<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def global_instance(cls):
 """Return a per-thread global batcher instance."""

        try:
            return GLOBAL_BATCHER.instance
        except AttributeError:

            instance = PrioritizedBatcher(
                **getattr(settings, 'PRIORITIZED_BATCHER', {})
            )
            GLOBAL_BATCHER.instance = instance
            return instance