input: Write a python function to sort a dictionary by key.
  assert sort_dict_by_key({'b': 2, 'a': 1, 'c': 3}) == {'a': 1, 'b': 2, 'c': 3}
  assert sort_dict_by_key({3: 'three', 1: 'one', 2: 'two'}) == {1: 'one', 2: 'two', 3: 'three'}
  assert sort_dict_by_key({}) == {}
output: def sort_dict_by_key(d):
      return dict(sorted(d.items()))