<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ci(python="python", codecov="codecov", coverage_file="coverage.xml", wheel=True):
 """ Run the most common CI tasks """


    # Import pip
    from pip import __version__ as pip_version
    if Version(pip_version) >= Version("10.0.0"):
        import pip._internal as pip
    else:
        import pip

    # Install requirements with pip
    pip.main(["install"] + DEPENDENCIES + REQUIREMENTS + ["-U"])
    # Build the installation wheel
    if wheel is True:
        build_and_install_wheel(python)
        # Remove all non-essential files
        for to_delete in TO_DELETE:
            rmtree(to_delete)
    # Run the tests on the installed ttkthemes
    return_code = run_command("{} -m nose --with-coverage --cover-xml --cover-package=ttkthemes".format(python))
    if return_code != 0:
        print("Tests failed.")
        exit(return_code)
    print("Tests successful.")
    # Run codecov
    return_code = run_command("{} -f {}".format(codecov, coverage_file))
    if return_code != 0:
        print("Codecov failed.")
        exit(return_code)
    # Successfully finished CI
    exit(0)