def static_analisys(application):
    """
    Performs a pyflakes static analysis with the same configuration as
    django CMS testsuite
    """
    try:
        from cms.test_utils.util.static_analysis import pyflakes
        application_module = __import__(application)
        report = pyflakes((application_module,))
        if type(report) == tuple:
            assert report[0] == 0
        else:
            assert report == 0
    except ImportError:
        print(
            """Static analysis available only if django CMS and pyflakes are installed.
Install django-app-helper[pyflakes] to fix this."""
            )
