<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_bench_extension(self, plugin_name, plugin_instance):
 """ Register a bench extension. :param plugin_name: Plugin name :param plugin_instance: PluginBase :return: Nothing """

        for attr in plugin_instance.get_bench_api().keys():
            if hasattr(self.bench, attr):
                raise PluginException("Attribute {} already exists in bench! Unable to add "
                                      "plugin {}.".format(attr, plugin_name))
            setattr(self.bench, attr, plugin_instance.get_bench_api().get(attr))