code: def _violates_constraint(fitness):
      return (
          not fitness.valid
          and fitness.constraint_violation is not None
          and sum(fitness.constraint_violation) > 0
      )
  
imports: import sys
  from copy import deepcopy
  from functools import partial
  from operator import mul, truediv
label_desc: Use image node_id 1 for calling a global function with example usage: _violates_constraint(fitness) and returns: unknown