code: def _neighborhood_aggregate(G, node, node_labels, edge_attr=None):
      """
      Compute new labels for given node by aggregating
      the labels of each node's neighbors.
      """
      label_list = []
      for nbr in G.neighbors(node):
          prefix = (
              "" if edge_attr is None else str(G[node][nbr][edge_attr])
          )
          label_list.append(prefix + node_labels[nbr])
      return node_labels[node] + "".join(sorted(label_list))
  
file_path: networkx/networkx/algorithms/graph_hashing.py
imports: from collections import Counter, defaultdict
  from hashlib import blake2b
  import networkx
label_desc: Use image node_id 3 for calling a global function with example usage: _neighborhood_aggregate(G, node, node_labels, edge_attr) and returns: unknown