code: def cxOnePoint(ind1, ind2):
      """Randomly select in each individual and exchange each subtree with the
      point as root between each individual.
      :param ind1: First tree participating in the crossover.
      :param ind2: Second tree participating in the crossover.
      :returns: A tuple of two trees.
      """
      # List all available primitive types in each individual
      types1 = defaultdict(list)
      types2 = defaultdict(list)
  
      for idx, node in enumerate(ind1[1:], 1):
          types1[node.ret].append(idx)
      common_types = []
      for idx, node in enumerate(ind2[1:], 1):
          if node.ret in types1 and node.ret not in types2:
              common_types.append(node.ret)
          types2[node.ret].append(idx)
  
      if len(common_types) > 0:
          type_ = np.random.choice(common_types)
  
          index1 = np.random.choice(types1[type_])
          index2 = np.random.choice(types2[type_])
  
          slice1 = ind1.searchSubtree(index1)
          slice2 = ind2.searchSubtree(index2)
          ind1[slice1], ind2[slice2] = ind2[slice2], ind1[slice1]
  
      return ind1, ind2
  
file_path: tpot/tpot/gp_deap.py
imports: import numpy
  from deap import tools, gp
  from inspect import isclass
  from .operator_utils import set_sample_weight
  from sklearn.utils import indexable
  from sklearn.metrics import check_scoring
  from sklearn.model_selection._validation import _fit_and_score
  from sklearn.base import clone
  from collections import defaultdict
  import warnings
  from stopit import threading_timeoutable, TimeoutException
label_desc: Use image node_id 6 for calling a global function with example usage: cxOnePoint(ind1, ind2) and returns: ind1,  ind2