input: Write a python function to group employees by their department.
  assert group_by_department([{"name": "Alice", "department": "HR"}, {"name": "Bob", "department": "Engineering"}, {"name": "Charlie", "department": "HR"}]) == {"HR": [{"name": "Alice", "department": "HR"}, {"name": "Charlie", "department": "HR"}], "Engineering": [{"name": "Bob", "department": "Engineering"}]}
  assert group_by_department([{"name": "Dave", "department": "Sales"}, {"name": "Eve", "department": "Engineering"}, {"name": "Frank", "department": "Sales"}]) == {"Sales": [{"name": "Dave", "department": "Sales"}, {"name": "Frank", "department": "Sales"}], "Engineering": [{"name": "Eve", "department": "Engineering"}]}
  assert group_by_department([]) == {}
output: def group_by_department(employees):
      department_dict = {}
      for employee in employees:
          department = employee["department"]
          if department not in department_dict:
              department_dict[department] = []
          department_dict[department].append(employee)
      return department_dict