def _update_rs_no_primary_from_member(sds, replica_set_name, server_description):
 topology_type = TOPOLOGY_TYPE.ReplicaSetNoPrimary
 if (replica_set_name is None):
  replica_set_name = server_description.replica_set_name
 elif (replica_set_name != server_description.replica_set_name):
  sds.pop(server_description.address)
  return (topology_type, replica_set_name)
 for address in server_description.all_hosts:
  if (address not in sds):
   sds[address] = ServerDescription(address)
 if (server_description.me and (server_description.address != server_description.me)):
  sds.pop(server_description.address)
 return (topology_type, replica_set_name)

def _update_rs_no_primary_from_member ( sds , replica_set_name , server_description ) : topology_type = TOPOLOGY_TYPE . ReplicaSetNoPrimary if ( replica_set_name is None ) : replica_set_name = server_description . replica_set_name elif ( replica_set_name != server_description . replica_set_name ) : sds . pop ( server_description . address ) return ( topology_type , replica_set_name ) for address in server_description . all_hosts : if ( address not in sds ) : sds [ address ] = ServerDescription ( address ) if ( server_description . me and ( server_description . address != server_description . me ) ) : sds . pop ( server_description . address ) return ( topology_type , replica_set_name )
rs without known primary .