'Return primary\'s address or None.'

def get_primary(self):

    with self._lock:
        topology_type = self._description.topology_type
        if (topology_type != TOPOLOGY_TYPE.ReplicaSetWithPrimary):
            return None
        return writable_server_selector(self._new_selection())[0].address
