input: 
  from typing import List
  
  def filter_emails_by_domain(emails: List[str], domain: str) -> List[str]:
      """
      Takes a list of email addresses and returns a filtered list of email addresses that belong to the specified domain.
      
      >>> filter_emails_by_domain(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@gmail.com")
      ["john@gmail.com", "sophie@gmail.com"]
      >>> filter_emails_by_domain(["alice@hotmail.com", "dan@hotmail.com", "eva@outlook.com"], "@hotmail.com")
      ["alice@hotmail.com", "dan@hotmail.com"]
      """
      return [email for email in emails if email.endswith(domain)]
  
output:     return [email for email in emails if email.endswith(domain)]