def METHOD_NAME():
    flow = Dataflow()
    flow.stateful_map("avg", OrderBook, OrderBook.update)
    assert encode_dataflow(flow) == json.dumps(
        {
            "type": "Dataflow",
            "steps": [
                {
                    "type": "StatefulMap",
                    "builder": "OrderBook",
                    "mapper": "update",
                    "step_id": "avg",
                }
            ],
        },
        sort_keys=True,
    )