class_docstr: A class representing group homomorphisms. Instantiate using `homomorphism()`.
  
  References
  ==========
  
  .. [1] Holt, D., Eick, B. and O'Brien, E. (2005). Handbook of computational group theory.
docstr: Return the composition of `self` and `other`, i.e.
  the homomorphism phi such that for all g in the domain
  of `other`, phi(g) = self(other(g))
docstr_tok: ["Return","the","composition","of","`","self","`","and","`","other","`",",","i.e",".","the","homomorphism","phi","such","that","for","all","g","in","the","domain","of","`","other","`",",","phi","(","g",")","=","self","(","other","(","g",")",")"]
code: def compose(self, other):
      """
      Return the composition of `self` and `other`, i.e.
      the homomorphism phi such that for all g in the domain
      of `other`, phi(g) = self(other(g))
  
      """
      if not other.image().is_subgroup(self.domain):
          raise ValueError(
              "The image of `other` must be a subgroup of "
              "the domain of `self`"
          )
      images = {g: self(other(g)) for g in other.images}
      return GroupHomomorphism(other.domain, self.codomain, images)
  
imports: import itertools
  from sympy.combinatorics.fp_groups import FpGroup, FpSubgroup, simplify_presentation
  from sympy.combinatorics.free_groups import FreeGroup
  from sympy.combinatorics.perm_groups import PermutationGroup
  from sympy.core.intfunc import igcd
  from sympy.ntheory.factor_ import totient
  from sympy.core.singleton import S
label_desc: Use image node_id 13 for calling the GroupHomomorphism obj's underlying member method code with example usage: obj.compose(other) and returns: GroupHomomorphism