class_docstr: Wrapper which allows multiple BaseDeformer objects to be combined
  for round-robin sampling.
  
  A given JAMS object will be transformed sequentially by
  each element of the union, in round-robin fashion.
  This is similar to `Pipeline`, except the deformers are independent
  of one another in a Union, rather than applied sequentially.
  
  Attributes
  ----------
  steps : argument array
      steps[i] is a tuple of `(name, Transformer)`
  
  Examples
  --------
  >>> P = muda.deformers.PitchShift(semitones=5)
  >>> T = muda.deformers.TimeStretch(speed=1.25)
  >>> union = muda.Union(steps=[('Pitch:maj3', P), ('Speed:1.25x', T)])
  >>> output_jams = list(union.transform(jam_in))
  
  See Also
  --------
  Pipeline
class_docstr_tok: ["Wrapper","which","allows","multiple","BaseDeformer","objects","to","be","combined","for","round-robin","sampling",".","A","given","JAMS","object","will","be","transformed","sequentially","by","each","element","of","the","union",",","in","round-robin","fashion",".","This","is","similar","to","`","Pipeline","`",",","except","the","deformers","are","independent","of","one","another","in","a","Union",",","rather","than","applied","sequentially",".","Attributes","--","--","--","--","--","steps",":","argument","array","steps","[","i","]","is","a","tuple","of","`","(","name",",","Transformer",")","`","Examples","--","--","--","--",">",">",">","P","=","muda.deformers.PitchShift","(","semitones=5",")",">",">",">","T","=","muda.deformers.TimeStretch","(","speed=1.25",")",">",">",">","union","=","muda.Union","(","steps=","[","(","'Pitch",":","maj3","'",",","P",")",",","(","'Speed:1.25x","'",",","T",")","]",")",">",">",">","output_jams","=","list","(","union.transform","(","jam_in",")",")","See","Also","--","--","--","--","Pipeline"]
docstr: Apply the sequence of transformations to a single jam object.
  
  Parameters
  ----------
  jam : jams.JAMS
      The jam object to transform
  
  Yields
  ------
  jam_out : jams.JAMS
      The jam objects produced by each member of the union
docstr_tok: ["Apply","the","sequence","of","transformations","to","a","single","jam","object",".","Parameters","--","--","--","--","--","jam",":","jams.JAMS","The","jam","object","to","transform","Yields","--","--","--","jam_out",":","jams.JAMS","The","jam","objects","produced","by","each","member","of","the","union"]
code: def transform(self, jam):
      """Apply the sequence of transformations to a single jam object.
  
      Parameters
      ----------
      jam : jams.JAMS
          The jam object to transform
  
      Yields
      ------
      jam_out : jams.JAMS
          The jam objects produced by each member of the union
      """
  
      for output in self.__serial_transform(jam, self.steps):
          yield output
  
imports: import numpy
  import copy
  from collections import OrderedDict
  import itertools
  import six
  import inspect
label_desc: Use image node_id 5 for calling the Union obj's underlying member method code with example usage: obj.transform(jam) without return types