input: def filter_emails(emails: list, domain: str) -> list:
      """
      Takes a list of email addresses and returns a filtered list of email addresses that belong to a particular domain.
      >>> filter_emails(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@gmail.com")
      ['john@gmail.com', 'sophie@gmail.com']
      """
output:     filtered_emails = []
      for email in emails:
          if email.endswith(domain):
              filtered_emails.append(email)
      return filtered_emails