input: Write a function to filter email addresses belonging to a specific domain. The function should take two parameters: a list of email addresses and the desired domain. It should return a filtered list of email addresses that match the specified domain.
  
  assert filter_emails(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@gmail.com")==["john@gmail.com", "sophie@gmail.com"]
  assert filter_emails(["example@outlook.com", "test@outlook.com", "other@gmail.com"], "@outlook.com")==["example@outlook.com", "test@outlook.com"]
  assert filter_emails([], "@yahoo.com")==[]
  assert filter_emails(["user@domain.com", "another@domain.com"], "@domain.com")==["user@domain.com", "another@domain.com"]
  assert filter_emails(["alice@hotmail.com", "charlie@hotmail.com", "dave@hotmail.com"], "@hotmail.com")==["alice@hotmail.com", "charlie@hotmail.com", "dave@hotmail.com"]
output: def filter_emails(emails, domain):
      return [email for email in emails if email.endswith(domain)]