def subscribe(self, py3_module, trigger_action, subsystem):
if self.pyudev_available:<EOL><INDENT>if self.udev_observer is None:<EOL><INDENT>self._setup_pyudev_monitoring()<EOL><DEDENT>if trigger_action not in ON_TRIGGER_ACTIONS:<EOL><INDENT>self.py3_wrapper.log(<EOL>"<STR_LIT>"<EOL>% (py3_module.module_full_name, trigger_action)<EOL>)<EOL>return False<EOL><DEDENT>self.udev_consumers[subsystem].append((py3_module, trigger_action))<EOL>self.py3_wrapper.log(<EOL>"<STR_LIT>"<EOL>% (py3_module.module_full_name, subsystem)<EOL>)<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>self.py3_wrapper.log(<EOL>"<STR_LIT>"<EOL>% (py3_module.module_full_name, subsystem)<EOL>)<EOL>return False<EOL><DEDENT>
Subscribe the given module to the given udev subsystem.

Here we will lazy load the monitor if necessary and return success or
failure based on the availability of pyudev.