parameters: (graph, ignore=[])
return_statement: return total
docstring: Count the total number of long-distance dependencies in a graph.
docstring_summary: Count the total number of long-distance dependencies in a graph.
docstring_tokens: Count the total number of long - distance dependencies in a graph .
function: def count_dependencies(graph, ignore=[]):
      """Count the total number of long-distance dependencies in a graph."""
      all_deps = graph.gather_dependencies()
  
      total = 0
      for vertex, deps in all_deps.items():
          if vertex[0] == 'concept' and vertex[1] not in ignore:
              dep_tags = set(d[1] for d in deps)     # don't double count concepts and shortcuts
              for ig in ignore:
                  if ig in dep_tags:
                      dep_tags.remove(ig)
              total += len(dep_tags)
  
      return total
function_tokens: def count_dependencies ( graph , ignore = [ ] ) : all_deps = graph . gather_dependencies ( ) total = 0 for vertex , deps in all_deps . items ( ) : if vertex [ 0 ] == 'concept' and vertex [ 1 ] not in ignore : dep_tags = set ( d [ 1 ] for d in deps ) # don't double count concepts and shortcuts for ig in ignore : if ig in dep_tags : dep_tags . remove ( ig ) total += len ( dep_tags ) return total