<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getbool(key, default=False):
 """ Returns True or False for any TRUE, FALSE, 0, or 1. Other values return default. """

    value = os.getenv(key)
    if value and value.lower() in ('true', '1'):
        value = True
    elif value and value.lower() in ('false', '0'):
        value = False
    else:
        value = default
    return value