code: def _as_pair(atom):
      if isinstance(atom, Not):
          return (atom.arg, False)
      else:
          return (atom, True)
  
imports: from collections import defaultdict
  from typing import Iterator
  from .logic import Logic, And, Or, Not
label_desc: Use image node_id 2 for calling a global function with example usage: _as_pair(atom) and returns: atom,  False, atom,  True