def get_port(node):

    if len(node)>1:
        if isinstance(node[1], ParseResults):
            if len(node[1][0])==2:
                if node[1][0][0]==':':
                    return node[1][0][1]
                    
    return None
dataset/ETHPy150Open erocarrera/pydot/dot_parser.py/get_port/original