<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lint(session):
 """Run flake8. Returns a failure if flake8 finds linting errors or sufficiently serious code quality issues. """

    session.interpreter = 'python3.6'
    session.install('flake8')

    # Install dev packages.
    _install_dev_packages(session)

    session.run(
        'flake8',
        '--exclude=contrib/opencensus-ext-ocagent/opencensus/ext/ocagent/trace_exporter/gen/',
        'context/', 'contrib/', 'opencensus/', 'tests/', 'examples/')