code: def __init__(self, build_ext):
      self.build_ext = build_ext
      self.pg_config_exe = self.build_ext.pg_config
      if not self.pg_config_exe:
          self.pg_config_exe = self.autodetect_pg_config_path()
      if self.pg_config_exe is None:
          sys.stderr.write(
              """
  Error: pg_config executable not found.
  
  pg_config is required to build psycopg2 from source.  Please add the directory
  containing pg_config to the $PATH or specify the full executable path with the
  option:
  
      python setup.py build_ext --pg-config /path/to/pg_config build ...
  
  or with the pg_config option in 'setup.cfg'.
  
  If you prefer to avoid building psycopg2 from source, please install the PyPI
  'psycopg2-binary' package instead.
  
  For further information please check the 'doc/src/install.rst' file (also at
  <https://www.psycopg.org/docs/install.html>).
  
  """
          )
          sys.exit(1)
  
imports: import os
  import sys
  import re
  import subprocess
  from setuptools import setup, Extension
  from distutils.command.build_ext import build_ext
  from distutils.ccompiler import get_default_compiler
  from distutils.errors import CompileError
  import configparser
label_desc: Use image node_id 1 to create a new PostgresConfig object  with example: obj = PostgresConfig(build_ext)