input: Write a python function to sort a dictionary by its values.
  assert sort_dict_by_values({'apple': 3, 'banana': 1, 'cherry': 2})==[('banana', 1), ('cherry', 2), ('apple', 3)]
  assert sort_dict_by_values({'dog': 10, 'cat': 5, 'bird': 8})==[('cat', 5), ('bird', 8), ('dog', 10)]
  assert sort_dict_by_values({'a': 100, 'b': 10, 'c': 50})==[('b', 10), ('c', 50), ('a', 100)]
output: def sort_dict_by_values(d):
      return sorted(d.items(), key=lambda item: item[1])