input: Write a python function to sort a dictionary by its values.
  assert sort_dict_by_values({'key1':1, 'key2': 3, 'key3': 2}) == {'key1': 1, 'key3': 2, 'key2': 3}
  assert sort_dict_by_values({'a': 2, 'b': 1, 'c': 3}) == {'b': 1, 'a': 2, 'c': 3}
  assert sort_dict_by_values({'x': 10, 'y': 5, 'z': 15}) == {'y': 5, 'x': 10, 'z': 15}
output: def sort_dict_by_values(d):
      return dict(sorted(d.items(), key=lambda item: item[1]))