def get_offset(code, line, key):
    """ Returns the offset between a given line number
        and the next line containing a specified key word"""
    offset = 0
    while True:
        if key in code[line + offset].replace(" ", ""):
            break
        offset += 1
    return offset