<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def detect_range(line = None):
    '''
    A helper function that checks a given host line to see if it contains
    a range pattern descibed in the docstring above.

    Returnes True if the given line contains a pattern, else False.
    '''
    if (not line.startswith("[") and
        line.find("[") != -1 and
        line.find(":") != -1 and
        line.find("]") != -1 and
        line.index("[") < line.index(":") < line.index("]")):
        return True
    else:
        return False