code: def standardise_string(input_string):
      """
      to make the user's input consistent
      replace any characters not in set [0-9a-zA-Z] with underscore _
  
      :param input_string: to be standardised
      :return: capitalised string
      """
      if not isinstance(input_string, string_types):
          return input_string
      new_name = re.sub(r"[^0-9a-zA-Z_\- ]+", "", input_string.strip())
      return new_name
  
file_path: NiftyNet/niftynet/utilities/user_parameters_helper.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import re
  from six import string_types
  from niftynet.utilities.user_parameters_regex import match_array
label_desc: Use image node_id 7 for calling a global function with example usage: standardise_string(input_string) and returns: new_name, input_string