input: Write a function to filter a list of email addresses and return only those that belong to a specified domain. The function should take a list of email addresses and a domain name as input, and it should return a new list containing only the email addresses that end with 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(["alice@hotmail.com", "daniel@gmail.com", "eve@yahoo.com"], "hotmail.com")==["alice@hotmail.com"]
  assert filter_emails(["adam@outlook.com", "fiona@outlook.com"], "outlook.com")==["adam@outlook.com", "fiona@outlook.com"]
  assert filter_emails(["george@gmail.com", "ivy@gmail.com"], "yahoo.com")==[]
  assert filter_emails([], "gmail.com")==[]
output: def filter_emails(emails, domain):
      return [email for email in emails if email.endswith(domain)]