code: def generic_node_match(attr, default, op):
      if isinstance(attr, str):
  
          def match(data1, data2):
              return op(
                  data1.get(attr, default), data2.get(attr, default)
              )
  
      else:
          attrs = list(zip(attr, default, op))  # Python 3
  
          def match(data1, data2):
              for attr, d, operator in attrs:
                  if not operator(
                      data1.get(attr, d), data2.get(attr, d)
                  ):
                      return False
              else:
                  return True
  
      return match
  
file_path: networkx/networkx/algorithms/isomorphism/matchhelpers.py
imports: import math
  import types
  from itertools import permutations
label_desc: Use image node_id 7 for calling a global function with example usage: generic_node_match(attr, default, op) and returns: match, op, True, False