human
Complete this python program:
def code_version(version):
assistant
#Here is the Python code you requested.

    """Decorator to support version-based cache mechanism.
    """
    if (not isinstance(version, tuple)):
        raise TypeError('version    must    be    tuple', version)
    def deco(f):
        f.code_version = version
        return f
    return deco