<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def string_to_list(string, sep=",", filter_empty=False):
 """Transforma una string con elementos separados por `sep` en una lista."""

    return [value.strip() for value in string.split(sep)
            if (not filter_empty or value)]