def METHOD_NAME(
    units: List[external_code.ControlNetUnit], p: StableDiffusionProcessing
):
    """Write infotext to `p`."""
    p.extra_generation_params.update(
        {
            Infotext.unit_prefix(i): serialize_unit(unit)
            for i, unit in enumerate(units)
            if unit.enabled
        }
    )