code: def evalKnapsack(individual):
      weight = 0.0
      value = 0.0
      for item in individual:
          weight += items[item][0]
          value += items[item][1]
      if len(individual) > MAX_ITEM or weight > MAX_WEIGHT:
          return 10000, 0  # Ensure overweighted bags are dominated
      return weight, value
  
file_path: deap/examples/ga/knapsack.py
imports: import random
  import numpy
  from deap import algorithms
  from deap import base
  from deap import creator
  from deap import tools
label_desc: Use image node_id 1 for calling a global function with example usage: evalKnapsack(individual) and returns: weight,  value, int,  int