code: def get_geos_paths():
      """Obtain the paths for compiling and linking with the GEOS C-API
  
      First the presence of the GEOS_INCLUDE_PATH and GEOS_INCLUDE_PATH environment
      variables is checked. If they are both present, these are taken.
  
      If one of the two paths was not present, geos-config is called (it should be on the
      PATH variable). geos-config provides all the paths.
  
      If geos-config was not found, no additional paths are provided to the extension. It is
      still possible to compile in this case using custom arguments to setup.py.
      """
      include_dir = os.environ.get("GEOS_INCLUDE_PATH")
      library_dir = os.environ.get("GEOS_LIBRARY_PATH")
      if include_dir and library_dir:
          return {
              "include_dirs": ["./src", include_dir],
              "library_dirs": [library_dir],
              "libraries": ["geos_c"],
          }
  
      geos_version = get_geos_config("--version")
      if not geos_version:
          log.warning(
              "Could not find geos-config executable. Either append the path to geos-config"
              " to PATH or manually provide the include_dirs, library_dirs, libraries and "
              "other link args for compiling against a GEOS version >=%s.",
              MIN_GEOS_VERSION,
          )
          return {}
  
      if parse_version(geos_version) < parse_version(MIN_GEOS_VERSION):
          raise ImportError(
              "GEOS version should be >={}, found {}".format(
                  MIN_GEOS_VERSION, geos_version
              )
          )
  
      libraries = []
      library_dirs = []
      include_dirs = ["./src"]
      extra_link_args = []
      for item in get_geos_config("--cflags").split():
          if item.startswith("-I"):
              include_dirs.extend(item[2:].split(":"))
  
      for item in get_geos_config("--clibs").split():
          if item.startswith("-L"):
              library_dirs.extend(item[2:].split(":"))
          elif item.startswith("-l"):
              libraries.append(item[2:])
          else:
              extra_link_args.append(item)
  
      return {
          "include_dirs": include_dirs,
          "library_dirs": library_dirs,
          "libraries": libraries,
          "extra_link_args": extra_link_args,
      }
  
file_path: shapely/setup.py
imports: import builtins
  import logging
  import os
  import subprocess
  import sys
  from pathlib import Path
  from pkg_resources import parse_version
  from setuptools import Extension, find_packages, setup
  from setuptools.command.build_ext import build_ext
  import versioneer
label_desc: Use image node_id 2 for calling a global function with example usage: get_geos_paths() and returns: dict, dict, dict