def __terminate_invalid_connection_request(self, other: "Parameter", dunder_meth_called: str) -> None:
        """Verify that components can be composed.

        Parameters
        ----------
        other
            object passed into the bitshift operator. We verify if is a
            ``Parameter`` class and that is not the type of the same component
        dunder_meth_called: str
            one of ['__lshift__', '__rshift__']. we need to know the
            directionality of the bitshift method called when we verify
            that the directionality of the dag is always outputs -> inputs.

        Raises
        ------
        TypeError, RuntimeError
            if the verification fails, we throw an exception to stop the
            connection from being created.

        """
        # assert this is actually a class object we can compare against.
        if not isinstance(other, self.__class__) or (other.__class__ != self.__class__):
            raise TypeError(f"Can only Compose another `Parameter` class, not {type(other)}")

        # assert not same instance
        if id(other) == id(self):
            raise RuntimeError("Cannot compose a parameters of same components")

        # assert bitshift directionality is acceptable for source/target map
        source = other if dunder_meth_called == "__lshift__" else self
        target = self if dunder_meth_called == "__lshift__" else other
        if source.position != "outputs":
            raise TypeError(
                f"A data source component can only provide a target with data listed "
                f"as ``output``. source component: `{source.component_uid}` "
                f"key: `{source.name}`"
            )
        if target.position != "inputs":
            raise TypeError(
                f"A data target component can only accept data into keys listed as "
                f"`inputs`. components: source=`{str(source)}` target={str(target)}"
            )
        if source.component_uid == target.component_uid:
            raise RuntimeError(
                f"Cannot create cycle by creating connection between outputs and "
                f"inputs of a single component. source component: `{source.component_uid}`"
            )
Verify that components can be composed.

        Parameters
        ----------
        other
            object passed into the bitshift operator. We verify if is a
            ``Parameter`` class and that is not the type of the same component
        dunder_meth_called: str
            one of ['__lshift__', '__rshift__']. we need to know the
            directionality of the bitshift method called when we verify
            that the directionality of the dag is always outputs -> inputs.

        Raises
        ------
        TypeError, RuntimeError
            if the verification fails, we throw an exception to stop the
            connection from being created.

        
src/flash/core/serve/core.py