code: def test_roundtrip(tmpdir, codec):
      tmpdir = str(tmpdir)
      if codec == "snappy":
          pytest.importorskip("snappy")
      fn = os.path.join(tmpdir, "out*.avro")
      b = db.from_sequence(expected, npartitions=3)
      b.to_avro(fn, schema=schema, codec=codec)
      b2 = db.read_avro(fn)
      assert b.compute() == b2.compute()
  
file_path: dask/dask/bag/tests/test_avro.py
imports: from __future__ import annotations
  import os
  import random
  import pytest
  import dask.bag
label_desc: Use image node_id 5 for calling a global function with example usage: test_roundtrip(tmpdir, codec) without return types