code: def _check_has_primary(sds):
      
      for s in sds.values():
          if s.server_type == SERVER_TYPE.RSPrimary:
              return TOPOLOGY_TYPE.ReplicaSetWithPrimary
      else:
          return TOPOLOGY_TYPE.ReplicaSetNoPrimary
docs: Current topology type is ReplicaSetWithPrimary. Is primary still known?
  
      Pass in a dict of ServerDescriptions.
  
      Returns new topology type.