def get_min_dist_node(dist, visited):
    """
    Gets the node with the minimum distance from the unvisited nodes

    Args:
        dist (dict): dictionary with nodes as keys and values is a liste which first element is the minimum distance and second one is the closest node
        visited (array): array of visited nodes

    Returns:
        (string): node with minimum distance
    """
    a = []
    for key in dist.keys(): 
        if key not in visited:
            a.append((dist[key][0], key))
    idx = a.index(min(a))
    return a[idx][1]