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

def get_source(path):
    ''' yields all non-empty lines in a file '''
    for line in read(path):
        if 'import' in line or len(line.strip()) == 0 or line.startswith('#'):
            continue
        if '__name__' in line and '__main__' in line:
            break
        else:
            yield line