<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def adapt_entropy(line, cfg, filter_obj):
 """Determine best filter by dispersion of row values"""

    lines = filter_obj.filter_all(line)
    res_c = [len(set(it)) for it in lines]
    r = res_c.index(min(res_c))
    return lines[r]