def METHOD_NAME(trace):
    maxId = 0
    for rec in trace:
        for key in rec:
            if key in [
                "objID",
                "propNameID",
                "propID",
                "hostObjectID",
                "propNamesID",
                "functionID",
            ]:
                maxId = max(maxId, rec[key])
            elif key in ["value", "retval"]:
                valueId = parse_value_id(rec[key])
                if valueId is not None:
                    maxId = max(maxId, valueId)
            elif key in ["args", "properties"]:
                for val in rec[key]:
                    valueId = parse_value_id(val)
                    if valueId is not None:
                        maxId = max(maxId, valueId)
    return maxId