code: def _most_frequent_labels(node, labeling, G):
      """Returns a set of all labels with maximum frequency in `labeling`.
  
      Input `labeling` should be a dict keyed by node to labels.
      """
      if not G[node]:
          # Nodes with no neighbors are themselves a community and are labeled
          # accordingly, hence the immediate if statement.
          return {labeling[node]}
  
      # Compute the frequencies of all neighbors of node
      freqs = Counter(labeling[q] for q in G[node])
      max_freq = max(freqs.values())
      return {
          label for label, freq in freqs.items() if freq == max_freq
      }
  
file_path: networkx/networkx/algorithms/community/label_propagation.py
imports: from collections import Counter, defaultdict, deque
  import networkx
  from networkx.utils import groups, not_implemented_for, py_random_state
label_desc: Use image node_id 7 for calling a global function with example usage: _most_frequent_labels(node, labeling, G) and returns: unknown, unknown