code: def write_to_file(file_dict, path_to_save):
      """
      Function to write data to files
      """
  
      for f_name in file_dict:
          if f_name == "vocab.dat":
              with open(
                  os.path.join(path_to_save + f_name), "w"
              ) as target_file:
                  for word in file_dict[f_name]:
                      target_file.write(str(word) + "\n")
          else:
              with open(
                  os.path.join(path_to_save + f_name), "w"
              ) as target_file:
                  for line in file_dict[f_name]:
                      target_file.write(
                          " ".join([str(tok) for tok in line]) + "\n"
                      )
  
file_path: nlp-architect/examples/reading_comprehension/match_lstm_mrc/prepare_data.py
imports: from __future__ import print_function
  import numpy
  import argparse
  import json
  import os
  from tqdm import tqdm
  from nlp_architect.utils.io import validate_existing_directory
  from nlp_architect.utils.text import SpacyInstance
label_desc: Use image node_id 6 for calling a global function with example usage: write_to_file(file_dict, path_to_save) without return types