def make_legacy_pyc(source):
pyc_file = imp.cache_from_source(source)<EOL>up_one = os.path.dirname(os.path.abspath(source))<EOL>legacy_pyc = os.path.join(up_one, source + ('<STR_LIT:c>' if __debug__ else '<STR_LIT:o>'))<EOL>os.rename(pyc_file, legacy_pyc)<EOL>return legacy_pyc<EOL>
Move a PEP 3147 pyc/pyo file to its legacy pyc/pyo location.

    The choice of .pyc or .pyo extension is done based on the __debug__ flag
    value.

    :param source: The file system path to the source file.  The source file
        does not need to exist, however the PEP 3147 pyc file must exist.
    :return: The file system path to the legacy pyc file.