<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_by_uri(cls, uri):
 """Get a file instance by URI."""

        assert uri is not None
        return cls.query.filter_by(uri=uri).one_or_none()