class_docstr: Represents a morphism which is a composition of other morphisms.
  
  Explanation
  ===========
  
  Two composite morphisms are equal if the morphisms they were
  obtained from (components) are the same and were listed in the
  same order.
  
  The arguments to the constructor for this class should be listed
  in diagram order: to obtain the composition `g\circ f` from the
  instances of :class:`Morphism` ``g`` and ``f`` use
  ``CompositeMorphism(f, g)``.
  
  Examples
  ========
  
  >>> from sympy.categories import Object, NamedMorphism, CompositeMorphism
  >>> A = Object("A")
  >>> B = Object("B")
  >>> C = Object("C")
  >>> f = NamedMorphism(A, B, "f")
  >>> g = NamedMorphism(B, C, "g")
  >>> g * f
  CompositeMorphism((NamedMorphism(Object("A"), Object("B"), "f"),
  NamedMorphism(Object("B"), Object("C"), "g")))
  >>> CompositeMorphism(f, g) == g * f
  True
class_docstr_tok: ["Represents","a","morphism","which","is","a","composition","of","other","morphisms",".","Explanation","===========","Two","composite","morphisms","are","equal","if","the","morphisms","they","were","obtained","from","(","components",")","are","the","same","and","were","listed","in","the","same","order",".","The","arguments","to","the","constructor","for","this","class","should","be","listed","in","diagram","order",":","to","obtain","the","composition","`","g\\circ","f","`","from","the","instances","of",":","class",":","`","Morphism","`","``","g","``","and","``","f","``","use","``","CompositeMorphism","(","f",",","g",")","``",".","Examples","========",">",">",">","from","sympy.categories","import","Object",",","NamedMorphism",",","CompositeMorphism",">",">",">","A","=","Object","(","``","A","''",")",">",">",">","B","=","Object","(","``","B","''",")",">",">",">","C","=","Object","(","``","C","''",")",">",">",">","f","=","NamedMorphism","(","A",",","B",",","``","f","''",")",">",">",">","g","=","NamedMorphism","(","B",",","C",",","``","g","''",")",">",">",">","g","*","f","CompositeMorphism","(","(","NamedMorphism","(","Object","(","``","A","''",")",",","Object","(","``","B","''",")",",","``","f","''",")",",","NamedMorphism","(","Object","(","``","B","''",")",",","Object","(","``","C","''",")",",","``","g","''",")",")",")",">",">",">","CompositeMorphism","(","f",",","g",")","==","g","*","f","True"]
docstr: Forgets the composite structure of this morphism.
  
  Explanation
  ===========
  
  If ``new_name`` is not empty, returns a :class:`NamedMorphism`
  with the supplied name, otherwise returns a :class:`Morphism`.
  In both cases the domain of the new morphism is the domain of
  this composite morphism and the codomain of the new morphism
  is the codomain of this composite morphism.
  
  Examples
  ========
  
  >>> from sympy.categories import Object, NamedMorphism
  >>> A = Object("A")
  >>> B = Object("B")
  >>> C = Object("C")
  >>> f = NamedMorphism(A, B, "f")
  >>> g = NamedMorphism(B, C, "g")
  >>> (g * f).flatten("h")
  NamedMorphism(Object("A"), Object("C"), "h")
docstr_tok: ["Forgets","the","composite","structure","of","this","morphism",".","Explanation","===========","If","``","new_name","``","is","not","empty",",","returns","a",":","class",":","`","NamedMorphism","`","with","the","supplied","name",",","otherwise","returns","a",":","class",":","`","Morphism","`",".","In","both","cases","the","domain","of","the","new","morphism","is","the","domain","of","this","composite","morphism","and","the","codomain","of","the","new","morphism","is","the","codomain","of","this","composite","morphism",".","Examples","========",">",">",">","from","sympy.categories","import","Object",",","NamedMorphism",">",">",">","A","=","Object","(","``","A","''",")",">",">",">","B","=","Object","(","``","B","''",")",">",">",">","C","=","Object","(","``","C","''",")",">",">",">","f","=","NamedMorphism","(","A",",","B",",","``","f","''",")",">",">",">","g","=","NamedMorphism","(","B",",","C",",","``","g","''",")",">",">",">","(","g","*","f",")",".flatten","(","``","h","''",")","NamedMorphism","(","Object","(","``","A","''",")",",","Object","(","``","C","''",")",",","``","h","''",")"]
code: def flatten(self, new_name):
      """
      Forgets the composite structure of this morphism.
  
      Explanation
      ===========
  
      If ``new_name`` is not empty, returns a :class:`NamedMorphism`
      with the supplied name, otherwise returns a :class:`Morphism`.
      In both cases the domain of the new morphism is the domain of
      this composite morphism and the codomain of the new morphism
      is the codomain of this composite morphism.
  
      Examples
      ========
  
      >>> from sympy.categories import Object, NamedMorphism
      >>> A = Object("A")
      >>> B = Object("B")
      >>> C = Object("C")
      >>> f = NamedMorphism(A, B, "f")
      >>> g = NamedMorphism(B, C, "g")
      >>> (g * f).flatten("h")
      NamedMorphism(Object("A"), Object("C"), "h")
  
      """
      return NamedMorphism(self.domain, self.codomain, new_name)
  
imports: from sympy.core import S, Basic, Dict, Symbol, Tuple, sympify
  from sympy.core.symbol import Str
  from sympy.sets import Set, FiniteSet, EmptySet
  from sympy.utilities.iterables import iterable
label_desc: Use image node_id 6 for calling the CompositeMorphism obj's underlying member method code with example usage: obj.flatten(new_name) and returns: NamedMorphism