<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean(ctx):
 """ clean generated project files """

    os.chdir(PROJECT_DIR)
    patterns = ['.cache',
                '.coverage',
                '.eggs',
                'build',
                'dist']
    ctx.run('rm -vrf {0}'.format(' '.join(patterns)))
    ctx.run('''find . \( -name '*,cover' -o -name '__pycache__' -o -name '*.py[co]' -o -name '_work' \) '''
            '''-exec rm -vrf '{}' \; || true''')