code: def create_merged_cdx_gen(sources, query):
      
      # Optimize: no need to merge if just one input
      if len(sources) == 1:
          cdx_iter = sources[0].load_cdx(query)
      else:
          source_iters = map(lambda src: src.load_cdx(query), sources)
          cdx_iter = merge(*(source_iters))
  
      for cdx in cdx_iter:
          yield cdx
docs: create a generator which loads and merges cdx streams
      ensures cdxs are lazy loaded