code: def _cram_to_fastq_regions(regions, cram_file, dirs, data):
      
      base_name = utils.splitext_plus(os.path.basename(cram_file))[0]
      work_dir = utils.safe_makedir(os.path.join(dirs["work"], "align_prep",
                                                 "%s-parts" % base_name))
      fnames = run_multicore(_cram_to_fastq_region,
                             [(cram_file, work_dir, base_name, region, data) for region in regions],
                             data["config"])
      # check if we have paired or single end data
      if any(not _is_gzip_empty(p1) for p1, p2, s in fnames):
          out = [[p1, p2] for p1, p2, s in fnames]
      else:
          out = [[s] for p1, p2, s in fnames]
      return out, work_dir
docs: Convert CRAM files to fastq, potentially within sub regions.
  
      Returns multiple fastq files that can be merged back together.