code: def samples(*sets):
      
      if len(sets) == 1:
          for example in sets[0].examples:
              yield example
      else:
          generators = [set_.examples for set_ in sets]
          for examples in product(*generators):
              yield examples
docs: Generate samples from the given sets using their ``examples`` method.
  
      Parameters
      ----------
      set1, ..., setN : `Set` instance
          Set(s) from which to generate the samples.
  
      Returns
      -------
      samples : `generator`
          Generator that yields tuples of examples from the sets.
  
      Examples
      --------
      >>> R, C = odl.RealNumbers(), odl.ComplexNumbers()
      >>> for [name_x, x], [name_y, y] in samples(R, C): pass  # use examples