docs: def write_targets(targets, **params):
      """Writes version info into version file"""
      handler = ReplacementHandler(**params)
      for target, regexer in regexer_for_targets(targets):
          with open(target) as fh:
              lines = fh.readlines()
          lines = replace_lines(regexer, handler, lines)
          with open(target, "w") as fh:
              fh.writelines(lines)
      if handler.missing:
          raise Exception(
              "Failed to complete all expected replacements: %r" % handler.missing
          )