def safe_dict_max(key, data):
    max_value = None
    for d in data:
        if (key in d) and (d[key] is not None):
            try:
                val = int(d[key])
            except ValueError:
                raise exc.OpenStackCloudException(
                    "Search for maximum value failed. "
                    "Value for {key} is not an integer: {value}".format(
                        key=key, value=d[key])
                )
            if (max_value is None) or (val > max_value):
                max_value = val
    return max_value
Define a callback debug function to get all the debug messages.
dataset/ETHPy150Open openstack-infra/shade/shade/_utils.py/safe_dict_max--crossover with--dataset/ETHPy150Open davidhalter/jedi/jedi/api/__init__.py/set_debug_function