input: Write a function to print a formatted table of grades for a given set of students. The function should accept a list of dictionaries where each dictionary contains a 'name' and a 'grade'. The table should align names and grades properly in a visually appealing format. If the input list is empty, the function should print an empty table.
  assert print_grade_table([
      {'name': "John", 'grade': 92},
      {'name': "Alice", 'grade': 95},
      {'name': "Bob", 'grade': 87}
  ])
  assert print_grade_table([])
output: def print_grade_table(students):
      if not students:
          print("Name  | Grade")
          print("-------------")
          return
      
      max_name_length = max(len(student['name']) for student in students)
      print(f"{'Name':<{max_name_length}} | Grade")
      print("-" * (max_name_length + 7))
      
      for student in students:
          print(f"{student['name']:<{max_name_length}} | {student['grade']}")