def _CheckIsValidAddress(self, valid_networks, octets_to_match, address):

    network = '.'.join(address.split('.')[:octets_to_match])
    return network in valid_networks
Check that an ip address is in valid_networks.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/ext/vmruntime/meta_app.py/MetaWSGIApp._CheckIsValidAddress