def node_completed_status(checknode):
 u' TODO: place this in the base.py file and refactor '
 node_state_does_not_require_overwrite = ((checknode.overwrite is False) or ((checknode.overwrite is None) and (not checknode._interface.always_run)))
 hash_exists = False
 try:
  (hash_exists, _, _, _) = checknode.hash_exists()
 except Exception:
  hash_exists = False
 return (hash_exists and node_state_does_not_require_overwrite)

def node_completed_status ( checknode ) : node_state_does_not_require_overwrite = ( ( checknode . overwrite is False ) or ( ( checknode . overwrite is None ) and ( not checknode . _interface . always_run ) ) ) hash_exists = False try : ( hash_exists , _ , _ , _ ) = checknode . hash_exists ( ) except Exception : hash_exists = False return ( hash_exists and node_state_does_not_require_overwrite )
a function to determine if a node has previously completed its work .