parameters: (tree)
return_statement: return tableOut, tableIn
docstring: Return two tables: one of outgoing and one of incoming connections,
    with the name versus the number of connections.
docstring_summary: Return two tables: one of outgoing and one of incoming connections,
    with the name versus the number of connections.
docstring_tokens: Return two tables : one of outgoing and one of incoming connections with the name versus the number of connections .
function: def findConnections(tree):
    """ Return two tables: one of outgoing and one of incoming connections,
    with the name versus the number of connections. """
    outgoing, incoming = tree.findConnectors()
    tableOut = {}
    for c in outgoing:
      for targetSet in c.getTargets(Tree):
        for target in targetSet:
          if isinstance(target, Connector):
            continue
          if tableOut.has_key(target):
            tableOut[target] += 1
          else:
            tableOut[target] = 1
    tableIn = {}
    for c in incoming:
      for origin in c.getOrigins(Tree):
        if isinstance(origin, Connector):
          continue
        if tableIn.has_key(origin):
          tableIn[origin] += 1
        else:
          tableIn[origin] = 1
    return tableOut, tableIn
function_tokens: def findConnections ( tree ) : outgoing , incoming = tree . findConnectors ( ) tableOut = { } for c in outgoing : for targetSet in c . getTargets ( Tree ) : for target in targetSet : if isinstance ( target , Connector ) : continue if tableOut . has_key ( target ) : tableOut [ target ] += 1 else : tableOut [ target ] = 1 tableIn = { } for c in incoming : for origin in c . getOrigins ( Tree ) : if isinstance ( origin , Connector ) : continue if tableIn . has_key ( origin ) : tableIn [ origin ] += 1 else : tableIn [ origin ] = 1 return tableOut , tableIn