docs: def _replace_variables(data, variables):
      """Replace the format variables in all items of data."""
      formatter = string.Formatter()
      return [formatter.vformat(item, [], variables) for item in data]