code: def get_effective_domain_id(request):
      
      default_domain = get_default_domain(request)
      domain_id = default_domain.get('id')
      domain_name = default_domain.get('name')
      return None if domain_name == DEFAULT_DOMAIN else domain_id
docs: Gets the id of the default domain.
  
      If the requests default domain is the same as DEFAULT_DOMAIN,
      return None.