def METHOD_NAME(
    switch_port: SwitchPort, patch_port: PatchPort, processor: User
) -> None:
    if patch_port.switch_port:
        raise PatchPortAlreadyPatchedException()
    message = (
        deferred_gettext("Added patch from {host}/{switch_port} to {patch_port}.")
        .format(
            host=switch_port.switch.host.name,
            switch_port=switch_port.name,
            patch_port=patch_port.name,
        )
    )
    log_room_event(message.to_json(),
                   processor, switch_port.switch.host.room)
    patch_port.switch_port = switch_port