def parse_policy(policy):
    """Parses a policy of nested list of tuples and converts them
    into a tuple of nested list of lists. Helps with TF serializability."""
    op_names = [[name for name, _, _ in subpolicy] for subpolicy in policy]
    op_probs = [[prob for _, prob, _ in subpolicy] for subpolicy in policy]
    op_levels = [[level for _, _, level in subpolicy] for subpolicy in policy]

    return op_names, op_probs, op_levels