(t, morphism)
Intelligently adds ``morphism`` to tuple ``t``.

        If ``morphism`` is a composite morphism, its components are
        added to the tuple.  If ``morphism`` is an identity, nothing
        is added to the tuple.

        No composability checks are performed.
Intelligently adds ``morphism`` to tuple ``t``.
Intelligently adds morphism to tuple t .
def _add_morphism(t, morphism):
        """
        Intelligently adds ``morphism`` to tuple ``t``.

        If ``morphism`` is a composite morphism, its components are
        added to the tuple.  If ``morphism`` is an identity, nothing
        is added to the tuple.

        No composability checks are performed.
        """
        if isinstance(morphism, CompositeMorphism):
            # ``morphism`` is a composite morphism; we have to
            # denest its components.
            return t + morphism.components
        elif isinstance(morphism, IdentityMorphism):
            # ``morphism`` is an identity.  Nothing happens.
            return t
        else:
            return t + Tuple(morphism)
def _add_morphism ( t , morphism ) : if isinstance ( morphism , CompositeMorphism ) : # ``morphism`` is a composite morphism; we have to # denest its components. return t + morphism . components elif isinstance ( morphism , IdentityMorphism ) : # ``morphism`` is an identity.  Nothing happens. return t else : return t + Tuple ( morphism )