code: def _combine_out_files(chr_files, work_dir, data):
      
      out_file = "%s.bed" % sshared.outname_from_inputs(chr_files)
      if not utils.file_exists(out_file):
          with file_transaction(data, out_file) as tx_out_file:
              with open(tx_out_file, "w") as out_handle:
                  for chr_file in chr_files:
                      with open(chr_file) as in_handle:
                          is_empty = in_handle.readline().startswith("track name=empty")
                      if not is_empty:
                          with open(chr_file) as in_handle:
                              shutil.copyfileobj(in_handle, out_handle)
      return out_file
docs: Concatenate all CNV calls into a single file.