code: def read_configuration(
      filepath, find_others=False, ignore_option_errors=False
  ):
      """Read given configuration file and returns options from it as a dict.
  
      :param str|unicode filepath: Path to configuration file
          to get options from.
  
      :param bool find_others: Whether to search for other configuration files
          which could be on in various places.
  
      :param bool ignore_option_errors: Whether to silently ignore
          options, values of which could not be resolved (e.g. due to exceptions
          in directives such as file:, attr:, etc.).
          If False exceptions are propagated as expected.
  
      :rtype: dict
      """
      from setuptools.dist import Distribution, _Distribution
  
      filepath = os.path.abspath(filepath)
  
      if not os.path.isfile(filepath):
          raise DistutilsFileError(
              "Configuration file %s does not exist." % filepath
          )
  
      current_directory = os.getcwd()
      os.chdir(os.path.dirname(filepath))
  
      try:
          dist = Distribution()
  
          filenames = dist.find_config_files() if find_others else []
          if filepath not in filenames:
              filenames.append(filepath)
  
          _Distribution.parse_config_files(dist, filenames=filenames)
  
          handlers = parse_configuration(
              dist,
              dist.command_options,
              ignore_option_errors=ignore_option_errors,
          )
  
      finally:
          os.chdir(current_directory)
  
      return configuration_to_dict(handlers)
  
imports: from __future__ import absolute_import, unicode_literals
  import io
  import os
  import sys
  import warnings
  import functools
  from collections import defaultdict
  from functools import partial
  from functools import wraps
  from importlib import import_module
  from distutils.errors import DistutilsOptionError, DistutilsFileError
  from setuptools.extern.packaging.version import LegacyVersion, parse
  from setuptools.extern.packaging.specifiers import SpecifierSet
  from setuptools.extern.six import string_types, PY3
label_desc: Use image node_id 1 for calling a global function with example usage: read_configuration(filepath, find_others, ignore_option_errors) and returns: configuration_to_dict