code: def plot_phens_circles(phen_grid, **kwargs):
      
      denom, palette = get_kwargs(phen_grid, kwargs, True)
  
      n_tasks = len(palette)
      grid = phen_grid
      for i in range(len(grid)):
          for j in range(len(grid[i])):
              if grid[i][j] != -1 and int(grid[i][j], 2) != -1 and \
                                      int(grid[i][j], 2) != 0:
                  first = True
                  b_ind = grid[i][j].find("b")
                  phen = grid[i][j][b_ind+1:]
                  for k in range(len(phen)):
                      if int(phen[k]) == 1:
                          plt.gca().add_patch(
                              plt.Circle(
                                  (j, i), radius=(n_tasks - k)*.05,
                                  lw=.1 if first else 0, ec="black",
                                  facecolor=palette[k], zorder=2+k))
                          first = False
  
              elif int(grid[i][j], 2) == 0:
                  plt.gca().add_patch(
                      plt.Circle(
                          (j, i), radius=(n_tasks)*.05,
                          lw=.1, ec="black",
                          facecolor="grey", zorder=2))
docs: Plots phenotypes represented as concentric circles. Each circle represents
      one task that the phenotype can perform, with larger circles representing
      more complex tasks.
  
      Arguments: phen_grid - a 2D array of strings representing binary numbers
  
      kwargs:
                 palette - a seaborn palette (list of RGB values) indicating
                           how to color values. Will be converted to a continuous
                           colormap if necessary
                 denom   - the maximum value of numbers in the grid (only used
                           if the grid actually contains numbers). This is used
                           to normalize values and use the full dynamic range of
                           the color pallete.
  
      TODO: come up with way to represent organisms that don't do any tasks.