code: def base_domain_matches(d1, d2):
      
      r1 = tldextract.extract(d1)
      r2 = tldextract.extract(d2)
      # r1 and r2 contain subdomain, domain and suffix.
      # We want to confirm that domain and suffix match.
      return r1.domain == r2.domain and r1.suffix == r2.suffix
docs: Check if two domains have the same base domain, using the Public Suffix List.
  
      >>> base_domain_matches('https://hasjob.co', 'hasjob.co')
      True
      >>> base_domain_matches('hasgeek.hasjob.co', 'hasjob.co')
      True
      >>> base_domain_matches('hasgeek.com', 'hasjob.co')
      False
      >>> base_domain_matches('static.hasgeek.co.in', 'hasgeek.com')
      False
      >>> base_domain_matches('static.hasgeek.co.in', 'hasgeek.co.in')
      True
      >>> base_domain_matches('example@example.com', 'example.com')
      True