def METHOD_NAME(db_session, factories):
    """
    In-place changes to Annotation.extra should be persisted.
    Setting an Annotation.extra value in-place:
        my_annotation.extra['foo'] = 'bar'
    should be persisted to the database.
    """
    annotation = factories.Annotation(userid="fred")
    annotation.extra["foo"] = "bar"
    # We need to commit the db session here so that the in-place change to
    # annotation.extra above would be lost if annotation.extra was a normal
    # dict. Without this commit() this test would never fail.
    db_session.commit()
    annotation = db_session.query(Annotation).get(annotation.id)
    assert annotation.extra == {"foo": "bar"}