code: def genotype(weights, steps=4, multiplier=4):
      def _parse(weights):
          gene = []
          n = 2
          start = 0
          for i in range(steps):
              end = start + n
              W = weights[start:end].copy()
              edges = sorted(
                  range(i + 2),
                  key=lambda x: -max(
                      W[x][k]
                      for k in range(len(W[x]))
                      if k != PRIMITIVES.index("none")
                  ),
              )[:2]
              for j in edges:
                  k_best = None
                  for k in range(len(W[j])):
                      if k != PRIMITIVES.index("none"):
                          if k_best is None or W[j][k] > W[j][k_best]:
                              k_best = k
                  gene.append((PRIMITIVES[k_best], j))
              start = end
              n += 1
          return gene
  
      gene_normal = _parse(softmax(weights[0], axis=-1))
      gene_reduce = _parse(softmax(weights[1], axis=-1))
  
      concat = range(2 + steps - multiplier, steps + 2)
      genotype = Genotype(
          normal=gene_normal,
          normal_concat=concat,
          reduce=gene_reduce,
          reduce_concat=concat,
      )
      return genotype
  
imports: from scipy.special import softmax
  from .genotypes import *
label_desc: Use image node_id 1 for calling a global function with example usage: genotype(weights, steps, multiplier) and returns: genotype, gene