code: def hide_nodes(nodes):
      """Returns a filter function that hides specific nodes."""
      nodes = set(nodes)
      return lambda node: node not in nodes
  
file_path: networkx/networkx/classes/filters.py
label_desc: Use image node_id 2 for calling a global function with example usage: hide_nodes(nodes) and returns: function