code: def merge_dataset(dst: str, src: str):
      meta_path_src = os.path.join(src, "meta.bin")
      meta_path_dst = os.path.join(dst, "meta.bin")
  
      info_src: List[FileInfo] = []
      if os.path.exists(meta_path_src):
          info_src = _read_info_list(meta_path_src)
      else:
          raise ValueError("Dataset not exists")
  
      info_dst: List[FileInfo] = []
      if os.path.exists(meta_path_dst):
          info_dst = _read_info_list(meta_path_dst)
      else:
          raise ValueError("Dataset not exists")
  
      curr_block = 0
      nw_info: List[FileInfo] = []
      for v in info_dst:
          num_file_block = v.block_end - v.block_begin
          nw_info.append(
              FileInfo(
                  v.file_name,
                  curr_block,
                  curr_block + num_file_block,
                  v.nbytes,
                  v.nlines,
                  v.mask,
                  v.block_size,
              )
          )
          curr_block += num_file_block
  
      for v in info_src:
          num_file_block = v.block_end - v.block_begin
  
          dst_db_name = os.path.join(dst, v.file_name)
          nw_fname = v.file_name
          if os.path.exists(dst_db_name):
              idx = 0
              while os.path.exists(dst_db_name + "_{}".format(idx)):
                  idx += 1
              dst_db_name = dst_db_name + "_{}".format(idx)
              nw_fname = nw_fname + "_{}".format(idx)
  
          shutil.copy(os.path.join(src, v.file_name), dst_db_name)
          nw_info.append(
              FileInfo(
                  nw_fname,
                  curr_block,
                  curr_block + num_file_block,
                  v.nbytes,
                  v.nlines,
                  v.mask,
                  v.block_size,
              )
          )
          curr_block += num_file_block
  
      _write_info_list(meta_path_dst, nw_info)
  
file_path: DeepKE/example/llm/CPM-Bee/src/cpm_live/dataset/utils.py
imports: import os
  import struct
  from typing import List, Optional
  from .distributed_dataset import SimpleDataset, build_dataset, _read_info_list, _write_info_list, _random_string, _DEFAULT_BLOCK_SIZE, FileInfo
  from .serializer import RawSerializer
  import random
  import shutil
label_desc: Use image node_id 4 for calling a global function with example usage: merge_dataset(dst, src) without return types