def register_detector(self, d):
if not isinstance(d, Detector):<EOL><INDENT>raise EthereumError("<STR_LIT>")<EOL><DEDENT>if d.name in self.detectors:<EOL><INDENT>raise EthereumError("<STR_LIT>")<EOL><DEDENT>self.detectors[d.name] = d<EOL>self.register_plugin(d)<EOL>return d.name<EOL>
Unregisters a plugin. This will invoke detector's `on_unregister` callback.
Shall be called after `.finalize`.