code: def check(source):
      
      compile(source, '<string>', 'exec', dont_inherit=True)
      reporter = pyflakes.reporter.Reporter(sys.stderr, sys.stderr)
      pyflakes.api.check(source, filename='<string>', reporter=reporter)
docs: Check code.