def rs_or_single_client(h=host, p=port, **kwargs):
    if client_context.replica_set_name:
        return rs_client(h, p, **kwargs)
    else:
        return single_client(h, p, **kwargs)
Executes all pending migrations across all capable
dataset/ETHPy150Open mongodb/mongo-python-driver/test/utils.py/rs_or_single_client--crossover with--dataset/ETHPy150Open paltman-archive/nashvegas/nashvegas/management/commands/upgradedb.py/Command.execute_migrations