<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _encode_label(label):
 """Convert a tuple label into a list. Works recursively on nested tuples."""

    if isinstance(label, tuple):
        return [_encode_label(v) for v in label]
    return label