<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_with_pep8(source_code, filename=None):

 """Check source code with pycodestyle"""

    try:
        args = get_checker_executable('pycodestyle')
        results = check(args, source_code, filename=filename, options=['-r'])
    except Exception:
        # Never return None to avoid lock in spyder/widgets/editor.py
        # See Issue 1547
        results = []
        if DEBUG_EDITOR:
            traceback.print_exc()  # Print exception in internal console
    return results