code: def compare_jsone_task_definition(parent_link, rebuilt_definitions):
      
      diffs = []
      for compare_definition in rebuilt_definitions['tasks']:
          # Rebuilt decision tasks have an extra `taskId`; remove
          if 'taskId' in compare_definition:
              del(compare_definition['taskId'])
          # remove key/value pairs where the value is empty, since json-e drops
          # them instead of keeping them with a None/{}/[] value.
          compare_definition = remove_empty_keys(compare_definition)
          runtime_definition = remove_empty_keys(parent_link.task)
  
          diff = list(dictdiffer.diff(compare_definition, runtime_definition))
          if diff:
              diffs.append(pprint.pformat(diff))
              continue
          log.info("{}: Good.".format(parent_link.name))
          break
      else:
          error_msg = "{} {}: the runtime task doesn't match any rebuilt definition!\n{}".format(
              parent_link.name, parent_link.task_id, pprint.pformat(diffs)
          )
          log.critical(error_msg)
          raise CoTError(error_msg)
docs: Compare the json-e rebuilt task definition vs the runtime definition.
  
      Args:
          parent_link (LinkOfTrust): the parent link to test.
          rebuilt_definitions (dict): the rebuilt task definitions.
  
      Raises:
          CoTError: on failure.