def METHOD_NAME(val):
    if isinstance(val, (list, tuple)):
        for item in val:
            if METHOD_NAME(item):
                return True
    elif isinstance(val, dict):
        for k, v in val.items():
            print(k)
            if METHOD_NAME(v):
                return True
    else:
        return paddle.is_tensor(val)