input: Write a python function to sort a dictionary by its values in descending order.
  assert sort_dict({'a': 1, 'b': 3, 'c': 2}) == {'b': 3, 'c': 2, 'a': 1}
  assert sort_dict({'apple': 10, 'banana': 5, 'cherry': 7}) == {'apple': 10, 'cherry': 7, 'banana': 5}
  assert sort_dict({'key1': 100, 'key2': 200, 'key3': 50}) == {'key2': 200, 'key1': 100, 'key3': 50}
output: def sort_dict(d):
      return dict(sorted(d.items(), key=lambda item: item[1], reverse=True))