code: def configuration_to_dict(
      handlers: Tuple["ConfigHandler", ...]
  ) -> dict:
      """Returns configuration data gathered by given handlers as a dict.
  
      :param list[ConfigHandler] handlers: Handlers list,
          usually from parse_configuration()
  
      :rtype: dict
      """
      config_dict: dict = defaultdict(dict)
  
      for handler in handlers:
          for option in handler.set_options:
              value = _get_option(handler.target_obj, option)
              config_dict[handler.section_prefix][option] = value
  
      return config_dict
  
imports: import contextlib
  import functools
  import os
  from collections import defaultdict
  from functools import partial
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, Any, Dict, Generic, Iterable, List, Optional, Set, Tuple, TypeVar, Union
  from ..errors import FileError, OptionError
  from ..extern.packaging.markers import default_environment
  from ..extern.packaging.requirements import InvalidRequirement, Requirement
  from ..extern.packaging.specifiers import SpecifierSet
  from ..extern.packaging.version import InvalidVersion, Version
  from ..warnings import SetuptoolsDeprecationWarning
  from .None import expand
label_desc: Use image node_id 5 for calling a global function with example usage: configuration_to_dict(handlers) and returns: config_dict