def require_compatible_version(compatible_version, word="File"):
    """Check that compatible version of input data is not too new."""
    if isinstance(compatible_version, str):
        compatible_version = parse_version(compatible_version)
    elif not isinstance(compatible_version, Version):
        raise ValueError("Type of `compatible_version` not understood.")
    
    current_version = parse_version(CURRENT_VERSION)
    if current_version < compatible_version:
        raise VersionError("{0} written for version >= {1}, this is {2}.".format(
            word, str(compatible_version), CURRENT_VERSION
        ))
Check that compatible version of input data is not too new.