<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_plugin(filename, plugin_globals, plugin_locals):
 """ Load the plugin from the given file. Return True if the plugin was loaded, or False if it wanted to be ignored. Raise an exception if there was an error. """


        plugin = open(filename, 'rU')

        try:
            exec(plugin.read(), plugin_globals, plugin_locals)
        except ImportError:
            return False
        except Exception as e:
            raise WidgetPluginError("%s: %s" % (e.__class__, str(e)))
        finally:
            plugin.close()

        return True