code: def delete_domain(db, organization, domain):
      
      with db.connect() as session:
          org = find_organization(session, organization)
  
          if not org:
              raise NotFoundError(entity=organization)
  
          dom = session.query(Domain).join(Organization).\
              filter(Organization.name == organization,
                     Domain.domain == domain).first()
  
          if not dom:
              raise NotFoundError(entity=domain)
  
          delete_domain_db(session, dom)
docs: Remove an organization from the registry.
  
      This function removes the given domain from the registry. Both
      organization and domain must exist in the registry. Otherwise,
      it will raise a 'NotFoundError' exception.
  
      :param db: database manager
      :param organization: name of the organization
      :param domain: name of the domain to remove
  
      :raises NotFoundError: raised when the organization or the domain
          do not exist in the registry.