Return a per-thread global batcher instance.

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