class_docstr: Has methods to ``enumerate`` and ``count`` the partitions of a multiset.
  
  This implements a refactored and extended version of Knuth's algorithm
  7.1.2.5M [AOCP]_."
  
  The enumeration methods of this class are generators and return
  data structures which can be interpreted by the same visitor
  functions used for the output of ``multiset_partitions_taocp``.
  
  Examples
  ========
  
  >>> from sympy.utilities.enumerative import MultisetPartitionTraverser
  >>> m = MultisetPartitionTraverser()
  >>> m.count_partitions([4,4,4,2])
  127750
  >>> m.count_partitions([3,3,3])
  686
  
  See Also
  ========
  
  multiset_partitions_taocp
  sympy.utilities.iterables.multiset_partitions
  
  References
  ==========
  
  .. [AOCP] Algorithm 7.1.2.5M in Volume 4A, Combinatoral Algorithms,
         Part 1, of The Art of Computer Programming, by Donald Knuth.
  
  .. [Factorisatio] On a Problem of Oppenheim concerning
         "Factorisatio Numerorum" E. R. Canfield, Paul Erdos, Carl
         Pomerance, JOURNAL OF NUMBER THEORY, Vol. 17, No. 1. August
         1983.  See section 7 for a description of an algorithm
         similar to Knuth's.
  
  .. [Yorgey] Generating Multiset Partitions, Brent Yorgey, The
         Monad.Reader, Issue 8, September 2007.
docstr: Allocates and initializes the partition stack.
  
  This is called from the enumeration/counting routines, so
  there is no need to call it separately.
docstr_tok: ["Allocates","and","initializes","the","partition","stack",".","This","is","called","from","the","enumeration\/counting","routines",",","so","there","is","no","need","to","call","it","separately","."]
code: def _initialize_enumeration(self, multiplicities):
      """Allocates and initializes the partition stack.
  
      This is called from the enumeration/counting routines, so
      there is no need to call it separately."""
  
      num_components = len(multiplicities)
      # cardinality is the total number of elements, whether or not distinct
      cardinality = sum(multiplicities)
  
      # pstack is the partition stack, which is segmented by
      # f into parts.
      self.pstack = [
          PartComponent()
          for i in range(num_components * cardinality + 1)
      ]
      self.f = [0] * (cardinality + 1)
  
      # Initial state - entire multiset in one part.
      for j in range(num_components):
          ps = self.pstack[j]
          ps.c = j
          ps.u = multiplicities[j]
          ps.v = multiplicities[j]
  
      self.f[0] = 0
      self.f[1] = num_components
      self.lpart = 0
  
label_desc: Use image node_id 3 for calling the MultisetPartitionTraverser obj's underlying member method code with example usage: obj._initialize_enumeration(multiplicities) without return types