<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _register_allocator(self, plugin_name, plugin_instance):
 """ Register an allocator. :param plugin_name: Allocator name :param plugin_instance: RunPluginBase :return: """

        for allocator in plugin_instance.get_allocators().keys():
            if allocator in self._allocators:
                raise PluginException("Allocator with name {} already exists! unable to add "
                                      "allocators from plugin {}".format(allocator, plugin_name))
            self._allocators[allocator] = plugin_instance.get_allocators().get(allocator)