def _sum_edge_attr(G, node, attr, method='edges', filter_key=None, split_on='-',
                   include_filter_flags=None, exclude_filter_flags=None):
    """accumulate attributes for one node_id in network G

    Parameters
    ----------
    G : networkx.Graph or networkx.MultiGraph
        a graph network to sum edge attributes at a given node.
        NOTE: For Directed graphs (DiGraph and MultiDiGraph) the
        'edges' method is equivalent to the 'out_edges' method.
    node : string or int
        the networkx node at which to query edge attributes
    attr : string
        an edge attribute key that maps to an int or float. Strings
        will not throw an error, but string concatenation is not the
        purpose of this function.
    method : string, optional (default='edges')
        a method name to select edges for the summation. Valid
        options include 'edges' (default), 'in_edges' and 'out_edges'.
         NOTE: For Directed graphs (DiGraph and MultiDiGraph) the
        'edges' method is equivalent to the 'out_edges' method.
    filter_key : string, optional (default=None)
        edge attribute key that will be searched by the filter flags kwargs
    split_on : string, optional (default='-')
        filter_key string will be split by this character to form a list
        of flags.
    include_filter_flags : list, optional (default=None)
    exclude_filter_flags : list, optional (default=None)

    Returns
    -------
    float
        the sum of the values associated with the `attr`

    """

    edges = getattr(G, method)(node, data=True)
    if not edges:
        return 0

    includes = edges
    if include_filter_flags is not None:
        includes = [
            edge for edge in edges
            if any([
                i in str(edge[2][filter_key]).split(split_on)
                for i in include_filter_flags])]

    excludes = []
    if exclude_filter_flags is not None:
        excludes = [
            edge for edge in edges
            if any([
                i in str(edge[2][filter_key]).split(split_on)
                for i in exclude_filter_flags])]

    edges = [i for i in includes if i not in excludes]

    return sum([data.get(attr, 0) for _from, _to, data in edges])