code: def lint_cfg(cfgp, **paths):
      if not paths:
          paths = get_paths_cfg()
  
      # Use configuration from sys and platform as "reference"
      cfgp_ref = ConfigParser()
      cfgp_ref.read([paths["sys"], paths["platform"]])
  
      # Check if pythran configuration files exists
      for loc, path in paths.items():
          exists = os.path.exists(path)
  
          msg = " ".join(
              [
                  "{} file".format(loc).rjust(13),
                  "exists:" if exists else "does not exist:",
                  path,
              ]
          )
          logger.info(msg) if exists else logger.warning(msg)
  
      for section in cfgp.sections():
          # Check if section in the current configuration exists in the
          # reference configuration
          if cfgp_ref.has_section(section):
              options = set(cfgp.options(section))
              options_ref = set(cfgp_ref.options(section))
  
              # Check if the options in the section are supported by the
              # reference configuration
              if options.issubset(options_ref):
                  logger.info(
                      (
                          "pythranrc section [{}] is valid and options are "
                          "correct"
                      ).format(section)
                  )
              else:
                  logger.warning(
                      (
                          "pythranrc section [{}] is valid but options {} "
                          "are incorrect!"
                      ).format(section, options.difference(options_ref))
                  )
          else:
              logger.warning(
                  "pythranrc section [{}] is invalid!".format(section)
              )
  
file_path: catboost/contrib/python/pythran/pythran/config.py
imports: import io
  import logging
  import os
  from shlex import split
  import sys
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: lint_cfg(cfgp) without return types