code: def apply_configuration(
      dist: "Distribution",
      filepath: _Path,
      ignore_option_errors=False,
  ) -> "Distribution":
      """Apply the configuration from a ``pyproject.toml`` file into an existing
      distribution object.
      """
      config = read_configuration(
          filepath, True, ignore_option_errors, dist
      )
      return _apply(dist, config, filepath)
  
imports: import logging
  import os
  from contextlib import contextmanager
  from functools import partial
  from typing import TYPE_CHECKING, Callable, Dict, Mapping, Optional, Set, Union
  from ..errors import FileError, InvalidConfigError
  from ..warnings import SetuptoolsWarning
  from .None import expand
  from ._apply_pyprojecttoml import _PREVIOUSLY_DEFINED, _MissingDynamic
  from ._apply_pyprojecttoml import apply
label_desc: Use image node_id 3 for calling a global function with example usage: apply_configuration(dist, filepath, ignore_option_errors) and returns: _apply