code: def find_domain(session, name):
      
      domain = session.query(Domain). \
          filter(Domain.domain == name).first()
  
      return domain
docs: Find a domain.
  
      Find a domain by its domain name using the given `session`.
      When the domain does not exist the function will
      return `None`.
  
      :param session: database session
      :param name: name of the domain to find
  
      :returns: a domain object; `None` when the domain
          does not exist