code: def _sanitize(recipe):
          
          recipe = recipe.copy()
          for k in list(recipe):
              if k not in ("start", "error") and int(k) and k != int(k):
                  recipe[int(k)] = recipe[k]
                  del recipe[k]
          for k in list(recipe):
              if "output" in recipe[k] and not isinstance(
                  recipe[k]["output"], (list, dict)
              ):
                  recipe[k]["output"] = [recipe[k]["output"]]
              # dicts should be normalized, too
          if "start" in recipe:
              recipe["start"] = [tuple(x) for x in recipe["start"]]
          return recipe
docs: Clean up a recipe that may have been stored as serialized json string.
          Convert any numerical pointers that are stored as strings to integers.