code: def _check_toplevel_misplaced(item):
      
      problem_keys = [k for k in item.keys() if k in ALGORITHM_KEYS]
      if len(problem_keys) > 0:
          raise ValueError("Unexpected configuration keywords found in top level of %s: %s\n"
                           "This should be placed in the 'algorithm' section."
                           % (item["description"], problem_keys))
      problem_keys = [k for k in item.keys() if k not in TOPLEVEL_KEYS]
      if len(problem_keys) > 0:
          raise ValueError("Unexpected configuration keywords found in top level of %s: %s\n"
                           % (item["description"], problem_keys))
docs: Check for algorithm keys accidentally placed at the top level.