def emit(self, signal, value=None, gather=False):
results = [] if gather else True<EOL>if hasattr(self, '<STR_LIT>') and signal in self.connections:<EOL><INDENT>for condition, values in self.connections[signal].items():<EOL><INDENT>if condition is None or condition == value or (callable(condition) and condition(value)):<EOL><INDENT>for slot, transform in values.items():<EOL><INDENT>if transform is not None:<EOL><INDENT>if callable(transform):<EOL><INDENT>used_value = transform(value)<EOL><DEDENT>elif isinstance(transform, str):<EOL><INDENT>used_value = transform.format(value=value)<EOL><DEDENT>else:<EOL><INDENT>used_value = transform<EOL><DEDENT><DEDENT>else:<EOL><INDENT>used_value = value<EOL><DEDENT>if used_value is not None:<EOL><INDENT>if(accept_arguments(slot, <NUM_LIT:1>)):<EOL><INDENT>result = slot(used_value)<EOL><DEDENT>elif(accept_arguments(slot, <NUM_LIT:0>)):<EOL><INDENT>result = slot()<EOL><DEDENT>else:<EOL><INDENT>result = '<STR_LIT>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>result = slot()<EOL><DEDENT>if gather:<EOL><INDENT>results.append(result)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>return results<EOL>
Emits a signal, causing all slot methods connected with the signal to be called (optionally w/ related value)

           signal: the name of the signal to emit, must be defined in the classes 'signals' list.
           value: the value to pass to all connected slot methods.
           gather: if set, causes emit to return a list of all slot results