(morphism)
Returns the length of a morphism.  The length of a morphism is
        the number of components it consists of.  A non-composite
        morphism is of length 1.
Returns the length of a morphism.  The length of a morphism is
        the number of components it consists of.  A non-composite
        morphism is of length 1.
Returns the length of a morphism . The length of a morphism is the number of components it consists of . A non - composite morphism is of length 1 .
def _morphism_length(morphism):
        """
        Returns the length of a morphism.  The length of a morphism is
        the number of components it consists of.  A non-composite
        morphism is of length 1.
        """
        if isinstance(morphism, CompositeMorphism):
            return len(morphism.components)
        else:
            return 1
def _morphism_length ( morphism ) : if isinstance ( morphism , CompositeMorphism ) : return len ( morphism . components ) else : return 1