docs: def as_dict(self) -> Dict[str, Any]:
          """Converts to a dict of attributes for easier serialization."""
          def _on_filter(obj: Any, name: str) -> bool:
              # Filter out any callbacks
              if isinstance(obj, BaseUnit):
                  if name.startswith('on_'):
                      return False
              return True
  
          return serializable(self, on_filter=_on_filter)