input: Write a python function to sort a dictionary by its values.
  assert sort_by_value({"a": 23, "b": 42, "c": 16}) == [('c', 16), ('a', 23), ('b', 42)]
  assert sort_by_value({"apple": 10, "banana": 5, "cherry": 20}) == [('banana', 5), ('apple', 10), ('cherry', 20)]
  assert sort_by_value({"x": 1, "y": 3, "z": 2}) == [('x', 1), ('z', 2), ('y', 3)]
output: def sort_by_value(d):
      return sorted(d.items(), key=lambda item: item[1])