def pipeBusSource(name, entity, busKey, structure, fmt): valueType = structure.model.fields[name][0] if "toggle" in entity.pipes[name]: valueType = "Void" return fmt \ .replace("%BUS_KEY%", busKey) \ .replace("%BUS_VALUE_TYPE%", valueType)