input: Write a function that takes a list of email addresses and a domain as input, and returns a filtered list of email addresses that belong to the specified domain. The function should use list comprehension to filter the emails. If the input list is empty, the function should return an empty list.
  
  def filter_emails_by_domain(emails, domain):
      return [email for email in emails if email.endswith(domain)]
  
  assert filter_emails_by_domain(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@gmail.com") == ["john@gmail.com", "sophie@gmail.com"]
  assert filter_emails_by_domain(["alice@hotmail.com", "james@yahoo.com"], "@hotmail.com") == ["alice@hotmail.com"]
  assert filter_emails_by_domain(["adam@apple.com", "lisa@microsoft.com"], "@yahoo.com") == []
  assert filter_emails_by_domain([], "@gmail.com") == []
output: def filter_emails_by_domain(emails, domain):
      return [email for email in emails if email.endswith(domain)]