class_docstr: Handles metadata supplied in configuration files.
class_docstr_tok: ["Handles","metadata","supplied","in","configuration","files","."]
docstr: Parses section options into a dictionary.
  
  Applies a given parser to each option in a section.
  
  :param dict section_options:
  :param callable values_parser: function with 2 args corresponding to key, value
  :rtype: dict
docstr_tok: ["Parses","section","options","into","a","dictionary",".","Applies","a","given","parser","to","each","option","in","a","section",".",":","param","dict","section_options",":",":","param","callable","values_parser",":","function","with","2","args","corresponding","to","key",",","value",":","rtype",":","dict"]
code: def _parse_section_to_dict_with_key(
      cls, section_options, values_parser
  ):
      """Parses section options into a dictionary.
  
      Applies a given parser to each option in a section.
  
      :param dict section_options:
      :param callable values_parser: function with 2 args corresponding to key, value
      :rtype: dict
      """
      value = {}
      for key, (_, val) in section_options.items():
          value[key] = values_parser(key, val)
      return value
  
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 12 for calling the ConfigHandler obj's underlying member method code with example usage: obj._parse_section_to_dict_with_key(cls, section_options, values_parser) and returns: value