class_docstr: BaseTransform is a base class that defines a pair of complementary
  coordinate mapping functions in both python and GLSL.
  
  All BaseTransform subclasses define map() and imap() methods that map
  an object through the forward or inverse transformation, respectively.
  
  The two class variables glsl_map and glsl_imap are instances of
  shaders.Function that define the forward- and inverse-mapping GLSL
  function code.
  
  Optionally, an inverse() method returns a new transform performing the
  inverse mapping.
  
  Note that although all classes should define both map() and imap(), it
  is not necessarily the case that imap(map(x)) == x; there may be instances
  where the inverse mapping is ambiguous or otherwise meaningless.
docstr: Transform multiplication returns a new transform that is equivalent to
  the two operands performed in series.
  
  By default, multiplying two Transforms `A * B` will return
  ChainTransform([A, B]). Subclasses may redefine this operation to
  return more optimized results.
  
  To ensure that both operands have a chance to simplify the operation,
  all subclasses should follow the same procedure. For `A * B`:
  
  1. A.__mul__(B) attempts to generate an optimized transform product.
  2. If that fails, it must:
  
         * return super(A).__mul__(B) OR
         * return NotImplemented if the superclass would return an
           invalid result.
  
  3. When BaseTransform.__mul__(A, B) is called, it returns 
     NotImplemented, which causes B.__rmul__(A) to be invoked.
  4. B.__rmul__(A) attempts to generate an optimized transform product.
  5. If that fails, it must:
  
         * return super(B).__rmul__(A) OR
         * return ChainTransform([B, A]) if the superclass would return
           an invalid result.
  
  6. When BaseTransform.__rmul__(B, A) is called, ChainTransform([A, B])
     is returned.
docstr_tok: ["Transform","multiplication","returns","a","new","transform","that","is","equivalent","to","the","two","operands","performed","in","series",".","By","default",",","multiplying","two","Transforms","`","A","*","B","`","will","return","ChainTransform","(","[","A",",","B","]",")",".","Subclasses","may","redefine","this","operation","to","return","more","optimized","results",".","To","ensure","that","both","operands","have","a","chance","to","simplify","the","operation",",","all","subclasses","should","follow","the","same","procedure",".","For","`","A","*","B","`",":","1",".","A.__mul__","(","B",")","attempts","to","generate","an","optimized","transform","product",".","2",".","If","that","fails",",","it","must",":","*","return","super","(","A",")",".__mul__","(","B",")","OR","*","return","NotImplemented","if","the","superclass","would","return","an","invalid","result",".","3",".","When","BaseTransform.__mul__","(","A",",","B",")","is","called",",","it","returns","NotImplemented",",","which","causes","B.__rmul__","(","A",")","to","be","invoked",".","4",".","B.__rmul__","(","A",")","attempts","to","generate","an","optimized","transform","product",".","5",".","If","that","fails",",","it","must",":","*","return","super","(","B",")",".__rmul__","(","A",")","OR","*","return","ChainTransform","(","[","B",",","A","]",")","if","the","superclass","would","return","an","invalid","result",".","6",".","When","BaseTransform.__rmul__","(","B",",","A",")","is","called",",","ChainTransform","(","[","A",",","B","]",")","is","returned","."]
code: def __mul__(self, tr):
      """
      Transform multiplication returns a new transform that is equivalent to
      the two operands performed in series.
  
      By default, multiplying two Transforms `A * B` will return
      ChainTransform([A, B]). Subclasses may redefine this operation to
      return more optimized results.
  
      To ensure that both operands have a chance to simplify the operation,
      all subclasses should follow the same procedure. For `A * B`:
  
      1. A.__mul__(B) attempts to generate an optimized transform product.
      2. If that fails, it must:
  
             * return super(A).__mul__(B) OR
             * return NotImplemented if the superclass would return an
               invalid result.
  
      3. When BaseTransform.__mul__(A, B) is called, it returns
         NotImplemented, which causes B.__rmul__(A) to be invoked.
      4. B.__rmul__(A) attempts to generate an optimized transform product.
      5. If that fails, it must:
  
             * return super(B).__rmul__(A) OR
             * return ChainTransform([B, A]) if the superclass would return
               an invalid result.
  
      6. When BaseTransform.__rmul__(B, A) is called, ChainTransform([A, B])
         is returned.
      """
      # switch to __rmul__ attempts.
      # Don't use the "return NotImplemted" trick, because that won't work if
      # self and tr are of the same type.
      return tr.__rmul__(self)
  
imports: from __future__ import division
  from ..shaders import Function
  from ...util.event import EventEmitter
  from .chain import ChainTransform
label_desc: Use image node_id 11 for calling the BaseTransform obj's underlying member method code with example usage: obj.__mul__(tr) and returns: tr