def get_func_code(func):
    if PY2:
        # Python 2
        return func.func_code
    else:
        # Python 3
        return func.__code__
Fetch list of public endpoint IPs from metadata server.
dataset/ETHPy150Open winpython/winpython/winpython/py3compat.py/get_func_code--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/compute-image-packages/google-daemon/usr/share/google/google_daemon/address_manager.py/AddressManager.ReadPublicEndpoints