def METHOD_NAME():
    ubq = UpdateByQuery()
    assert {} == ubq.to_dict()
    ubq = ubq.query("match", f=42)
    assert {"query": {"match": {"f": 42}}} == ubq.to_dict()
    assert {"query": {"match": {"f": 42}}, "size": 10} == ubq.to_dict(size=10)
    ubq = UpdateByQuery(extra={"size": 5})
    assert {"size": 5} == ubq.to_dict()
    ubq = UpdateByQuery(extra={"extra_q": Q("term", category="conference")})
    assert {"extra_q": {"term": {"category": "conference"}}} == ubq.to_dict()