def _create_node_matrix_from_coord_section(specs):
    """Transformed parsed data from NODE_COORD_SECTION into an upper triangular matrix

    Calculates distances between nodes
    'MATRIX' key added to `specs`
    """
    distances = specs['NODE_COORD_SECTION']

    specs['MATRIX'] = {}

    for i in distances:
        origin = tuple(distances[i])

        specs['MATRIX'][i] = {}

        for j in specs['NODE_COORD_SECTION']:
            destination = tuple(distances[j])

            distance = calculate_euc_distance(origin, destination)

            #
            # Upper triangular matrix
            # if i > j, ij = 0
            #
            #if i > j:
            #    continue

            specs['MATRIX'][i][j] = distance