code: def __force_writing_new_mapping(filename, mapping_dict):
      """
      Writes a mapping dictionary to file
  
      :param filename: name of the file in which to write the saved mapping
      :param mapping_dict: mapping dictionary to save in the file
      :return:
      """
      with open(filename, "w+") as f:
          for mod in mapping_dict.keys():
              mapping_string = " ".join(map(str, mapping_dict[mod]))
              string_fin = "{} {}\n".format(mod, mapping_string)
              f.write(string_fin)
      return
  
file_path: NiftyNet/niftynet/utilities/histogram_standardisation.py
imports: from __future__ import absolute_import, print_function, division
  import os
  import numpy
  import numpy.ma
  import tensorflow
  from niftynet.io.misc_io import touch_folder
  from niftynet.utilities.util_common import look_up_operations, print_progress_bar
label_desc: Use image node_id 10 for calling a global function with example usage: __force_writing_new_mapping(filename, mapping_dict) without return types