<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def str_to_bool(val):
 """ Helper function to turn a string representation of "true" into boolean True. """

    if isinstance(val, str):
        val = val.lower()

    return val in ["true", "on", "yes", True]