input: from typing import List
  
  def filter_emails_by_domain(emails: List[str], domain: str) -> List[str]:
      """ Takes a list of email addresses and a domain string, and returns a 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", "ben@gmail.com", "charlie@hotmail.com"], "@hotmail.com")
      ['alice@hotmail.com', 'charlie@hotmail.com']
      """
output:     filtered_emails = [email for email in emails if email.endswith(domain)]
      return filtered_emails