async def METHOD_NAME(
    self,
    port_values: dict[PortKey, tuple[ItemConcreteValue | None, SetKWargs | None]],
    *,
    progress_bar: ProgressBarData,
) -> None:
    """
    Sets the provided values to the respective input or output ports
    Only supports port_key by name, not able to distinguish between inputs
    and outputs using the index.
    raises ValidationError
    """
    tasks = []
    async with progress_bar.sub_progress(
        steps=len(port_values.items())
    ) as sub_progress:
        for port_key, (value, set_kwargs) in port_values.items():
            # pylint: disable=protected-access
            try:
                tasks.append(
                    self.internal_outputs[port_key]._set(
                        value, set_kwargs=set_kwargs, progress_bar=sub_progress
                    )
                )
            except UnboundPortError:
                # not available try inputs
                # if this fails it will raise another exception
                tasks.append(
                    self.internal_inputs[port_key]._set(
                        value, set_kwargs=set_kwargs, progress_bar=sub_progress
                    )
                )
        results = await logged_gather(*tasks)
        await self.save_to_db_cb(self)
    # groups all ValidationErrors pre-pending 'port_key' to loc and raises ValidationError
    if errors := [
        list(flatten_errors([r], self.__config__, loc=(f"{port_key}",)))
        for port_key, r in zip(port_values.keys(), results)
        if isinstance(r, ValidationError)
    ]:
        raise ValidationError(errors, model=type(self))