def selectNodeByAttributeValue(graph, attr_field, attr_value):
    """
    Returns a list of nodes filterd by the given attribute field and corresponding value.

    Note: To select a single unique node. You must define a unique attribute value in your layer.

    PARAMETER(S)

    : graph : A networkx graph object.

    : attr_field : Attribute field name of the feature.

    : attr_value : Attribute value of the feature


    RETURN(S)

    : nodes_by_attr_value :  List of node filtered nodes.

    """

    g = graph
    attr_field = str(attr_field)
    attr_value = attr_value

    nodes_data = g.nodes(data=True)

    nodes_by_attr_value = []

    for n in nodes_data:

        if n[1]['geom']['properties'][attr_field] == attr_value:

            nodes_by_attr_value.append(n)

    return nodes_by_attr_value