def METHOD_NAME(self, event: TCPScanEvent):
    source_machine_id = self._network_model_update_facade.get_machine_id_from_agent_id(
        event.source
    )
    target_machine = self._network_model_update_facade.get_or_create_target_machine(
        event.target
    )
    tcp_connections = self._get_tcp_connections_from_event(event)
    network_services = self._get_new_network_services_from_event(event, target_machine)
    self._node_repository.upsert_communication(
        source_machine_id, target_machine.id, CommunicationType.SCANNED
    )
    self._node_repository.upsert_tcp_connections(
        source_machine_id, {target_machine.id: tuple(tcp_connections)}
    )
    self._machine_repository.upsert_network_services(target_machine.id, network_services)