def METHOD_NAME(model, direction, prefix='', splits=['train', 'test', 'valid'], pairs_per_shard=None):
    src, tgt = direction.split('-')
    for split in splits:
        src_raw, tgt_raw = f'{RAW_DIR}/{split}{prefix}.{direction}.{src}', f'{RAW_DIR}/{split}{prefix}.{direction}.{tgt}'
        if os.path.exists(src_raw) and os.path.exists(tgt_raw):
            cmd = f"""python {SPM_ENCODE} \
            --model {model}\
            --output_format=piece \
            --inputs {src_raw} {tgt_raw}  \
            --outputs {BPE_DIR}/{direction}{prefix}/{split}.bpe.{src} {BPE_DIR}/{direction}{prefix}/{split}.bpe.{tgt} """
            print(cmd)
            call(cmd)