code: def emit(self, *args, **kwargs):
          
  
          if self._block:
              return
  
          for slot in self._slots:
              if not slot:
                  continue
              elif isinstance(slot, partial):
                  slot()
              elif isinstance(slot, weakref.WeakKeyDictionary):
                  # For class methods, get the class object and call the method accordingly.
                  for obj, method in slot.items():
                      method(obj, *args, **kwargs)
              elif isinstance(slot, weakref.ref):
                  # If it's a weakref, call the ref to get the instance and then call the func
                  # Don't wrap in try/except so we don't risk masking exceptions from the actual func call
                  if (slot() is not None):
                      slot()(*args, **kwargs)
              else:
                  # Else call it in a standard way. Should be just lambdas at this point
                  slot(*args, **kwargs)
docs: Calls all the connected slots with the provided args and kwargs unless block is activated