input: Write a function to sort a list of dictionaries by a specified key in each dictionary. The function should return the sorted list. If the list is empty, it should return an empty list. The key to sort by should be provided as an argument to the function.
  
  assert sort_list_of_dicts_by_key([{'name': 'Tom', 'age': 25}, {'name': 'John', 'age': 21}, {'name': 'Adam', 'age': 26}], 'age') == [{'name': 'John', 'age': 21}, {'name': 'Tom', 'age': 25}, {'name': 'Adam', 'age': 26}]
  assert sort_list_of_dicts_by_key([{'name': 'Tom', 'age': 25}, {'name': 'John', 'age': 21}, {'name': 'Adam', 'age': 26}], 'name') == [{'name': 'Adam', 'age': 26}, {'name': 'John', 'age': 21}, {'name': 'Tom', 'age': 25}]
  assert sort_list_of_dicts_by_key([], 'name') == []
  assert sort_list_of_dicts_by_key([{'name': 'Tom', 'age': 25}], 'age') == [{'name': 'Tom', 'age': 25}]
output: def sort_list_of_dicts_by_key(lst, key):
      return sorted(lst, key=lambda x: x.get(key))