def METHOD_NAME(barerepo):
    data = b"hello world"
    # invalid object type
    with pytest.raises(ValueError):
        barerepo.write(pygit2.GIT_OBJ_ANY, data)
    oid = barerepo.write(pygit2.GIT_OBJ_BLOB, data)
    assert type(oid) == pygit2.Oid