def heuristic(network, node, goal, dist_func):
    """
    Heuristic function for estimating distance from specified node to goal node.

    Args:
        network (object): Networkx representation of the network
        node (int): Node for which to compute the heuristic
        goal (int): Goal node
        dist_func (function): Function used to compute distance between two nodes.

    Returns:
        (float): Computed heuristic
    """
    
    # Compute distance from node to goal.
    return dist_func(node, goal)