class_docstr: Class that checks configuration versions and dependency compatibilities.
  
  `ConfigCompatChecker` checks a given set of configurations and their versions
  against supported versions and dependency rules defined in `.ini` config file.
  For project `TensorFlow Builder`, it functions as a sub-module for the builder
  service that validates requested build configurations from a client prior to
  initiating a TensorFlow build.
class_docstr_tok: ["Class","that","checks","configuration","versions","and","dependency","compatibilities",".","`","ConfigCompatChecker","`","checks","a","given","set","of","configurations","and","their","versions","against","supported","versions","and","dependency","rules","defined","in","`",".ini","`","config","file",".","For","project","`","TensorFlow","Builder","`",",","it","functions","as","a","sub-module","for","the","builder","service","that","validates","requested","build","configurations","from","a","client","prior","to","initiating","a","TensorFlow","build","."]
docstr: Filters dependency compatibility rules defined in the `.ini` config file.
  
  Dependency specifications are defined as the following:
    `<config> <config_version> requires <dependency> <dependency_version>`
  e.g.
    `python 3.7 requires tensorflow 1.13`
    `tensorflow range(1.0.0, 1.13.1) requires gcc range(4.8, )`
  
  Args:
    line: String that is a dependency specification defined under `Dependency`
          section in the `.ini` config file.
  
  Returns:
    Dict with configuration and its dependency information.
      e.g. {`cfg`: `python`,       # configuration name
            `cfg_spec`: `3.7`,     # configuration version
            `cfgd`: `tensorflow`,  # dependency name
            `cfgd_spec`: `4.8`}    # dependency version
docstr_tok: ["Filters","dependency","compatibility","rules","defined","in","the","`",".ini","`","config","file",".","Dependency","specifications","are","defined","as","the","following",":","`","<","config",">","<","config_version",">","requires","<","dependency",">","<","dependency_version",">","`","e.g",".","`","python","3.7","requires","tensorflow","1.13","`","`","tensorflow","range","(","1.0.0",",","1.13.1",")","requires","gcc","range","(","4.8",",",")","`","Args",":","line",":","String","that","is","a","dependency","specification","defined","under","`","Dependency","`","section","in","the","`",".ini","`","config","file",".","Returns",":","Dict","with","configuration","and","its","dependency","information",".","e.g",".","{","`","cfg","`",":","`","python","`",",","#","configuration","name","`","cfg_spec","`",":","`","3.7","`",",","#","configuration","version","`","cfgd","`",":","`","tensorflow","`",",","#","dependency","name","`","cfgd_spec","`",":","`","4.8","`","}","#","dependency","version"]
code: def filter_dependency(self, line):
      """Filters dependency compatibility rules defined in the `.ini` config file.
  
      Dependency specifications are defined as the following:
        `<config> <config_version> requires <dependency> <dependency_version>`
      e.g.
        `python 3.7 requires tensorflow 1.13`
        `tensorflow range(1.0.0, 1.13.1) requires gcc range(4.8, )`
  
      Args:
        line: String that is a dependency specification defined under `Dependency`
              section in the `.ini` config file.
  
      Returns:
        Dict with configuration and its dependency information.
          e.g. {`cfg`: `python`,       # configuration name
                `cfg_spec`: `3.7`,     # configuration version
                `cfgd`: `tensorflow`,  # dependency name
                `cfgd_spec`: `4.8`}    # dependency version
      """
      line = line.strip("\n")
      expr = r"(?P<cfg>[\S]+) (?P<cfg_spec>range\([\d\.\,\s]+\)( )?"
      expr += (
          r"(include\([\d\.\,\s]+\))?( )?(exclude\([\d\.\,\s]+\))?( )?"
      )
      expr += (
          r"|[\d\,\.\s]+) requires (?P<cfgd>[\S]+) (?P<cfgd_spec>range"
      )
      expr += r"\([\d\.\,\s]+\)( )?(include\([\d\.\,\s]+\))?( )?"
      expr += r"(exclude\([\d\.\,\s]+\))?( )?|[\d\,\.\s]+)"
      r = re.match(expr, line.strip("\n"))
  
      return r.groupdict()
  
file_path: tensorflow-upstream/tensorflow/tools/tensorflow_builder/compat_checker/compat_checker.py
imports: import configparser
  import re
  import sys
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 3 for calling the ConfigCompatChecker obj's underlying member method code with example usage: obj.filter_dependency(line) and returns: r