def METHOD_NAME(barerepo):
    def create_conflict_file(repo, branch, content):
        oid = repo.create_blob(content.encode('utf-8'))
        tb = repo.TreeBuilder()
        tb.insert('conflict', oid, pygit2.GIT_FILEMODE_BLOB)
        tree = tb.write()
        sig = pygit2.Signature('Author', 'author@example.com')
        commit = repo.create_commit(branch.name, sig, sig,
                'Conflict', tree, [branch.target])
        assert commit is not None
        return commit
    b1 = barerepo.create_branch('b1', barerepo.head.peel())
    c1 = create_conflict_file(barerepo, b1, 'ASCII - abc')
    b2 = barerepo.create_branch('b2', barerepo.head.peel())
    c2 = create_conflict_file(barerepo, b2, 'Unicode - äüö')
    index = barerepo.merge_commits(c1, c2)
    assert index.conflicts is not None
    # ConflictCollection does not allow calling len(...) on it directly so
    # we have to calculate length by iterating over its entries
    assert sum(1 for _ in index.conflicts) == 1
    (a, t, o) = index.conflicts['conflict']
    diff = barerepo.merge_file_from_index(a, t, o)
    assert diff == '''<<<<<<< conflict