def METHOD_NAME(self, content: Content, tag: str) -> typing.Optional[TagOnContent]:
    query = self._session.query(TagOnContent).filter(
        and_(TagOnContent.tag == tag, TagOnContent.content == content)
    )
    try:
        return query.one()
    except NoResultFound:
        return None