<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_object_version(value):
 """Get an object version object from an object version ID or an object version. :param value: A :class:`invenio_files_rest.models.ObjectVersion` or an object version ID. :returns: A :class:`invenio_files_rest.models.ObjectVersion` instance. """

    return value if isinstance(value, ObjectVersion) \
        else ObjectVersion.query.filter_by(version_id=value).one_or_none()