code: def evalTSP(individual):
      distance = distance_map[individual[-1]][individual[0]]
      for gene1, gene2 in zip(individual[0:-1], individual[1:]):
          distance += distance_map[gene1][gene2]
      return (distance,)
  
file_path: deap/examples/ga/tsp.py
imports: import array
  import random
  import json
  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: evalTSP(individual) and returns: distance