code: def has_section_in_config(config, required_custom_section):
      """
      check if section name exists in a config file
      raises value error if it doesn't exist
  
      :param config:
      :param required_custom_section:
      :return:
      """
      required_custom_section = standardise_string(
          required_custom_section
      )
      if required_custom_section is not None:
          user_sections = [
              standardise_string(section_name)
              for section_name in config.sections()
          ]
          if required_custom_section not in user_sections:
              raise ValueError
  
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 8 for calling a global function with example usage: has_section_in_config(config, required_custom_section) without return types