class_docstr: Handles metadata supplied in configuration files.
class_docstr_tok: ["Handles","metadata","supplied","in","configuration","files","."]
code: def __setitem__(self, option_name, value):
      target_obj = self.target_obj
  
      # Translate alias into real name.
      option_name = self.aliases.get(option_name, option_name)
  
      try:
          current_value = getattr(target_obj, option_name)
      except AttributeError:
          raise KeyError(option_name)
  
      if current_value:
          # Already inhabited. Skipping.
          return
  
      try:
          parsed = self.parsers.get(option_name, lambda x: x)(value)
      except (Exception,) * self.ignore_option_errors:
          return
  
      simple_setter = functools.partial(
          target_obj.__setattr__, option_name
      )
      setter = getattr(
          target_obj, "set_%s" % option_name, simple_setter
      )
      setter(parsed)
  
      self.set_options.append(option_name)
  
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 4 for calling the ConfigHandler obj's underlying member method code with example usage: obj.__setitem__(option_name, value) without return types