def __init__(
            self, standalones, members, mongoses, ismaster_hosts=None,
            *args, **kwargs):
        self.mock_standalones = standalones[:]
        self.mock_members = members[:]

        if self.mock_members:
            self.mock_primary = self.mock_members[0]
        else:
            self.mock_primary = None

        if ismaster_hosts is not None:
            self.mock_ismaster_hosts = ismaster_hosts
        else:
            self.mock_ismaster_hosts = members[:]

        self.mock_mongoses = mongoses[:]

        # Hosts that should raise socket errors.
        self.mock_down_hosts = []

        # Hostname -> (min wire version, max wire version)
        self.mock_wire_versions = {}

        # Hostname -> max write batch size
        self.mock_max_write_batch_sizes = {}

        # Hostname -> round trip time
        self.mock_rtts = {}

        kwargs['_pool_class'] = partial(MockPool, self)
        kwargs['_monitor_class'] = partial(MockMonitor, self)

        super(MockClient, self).__init__(*args, **kwargs)
Detect location information.
dataset/ETHPy150Open mongodb/mongo-python-driver/test/pymongo_mocks.py/MockClient.__init__--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/util/location.py/detect_location_info