def METHOD_NAME():
    """test_avro_dataset_partition"""
    # The test.bin was created from avro/lang/c++/examples/datafile.cc.
    filename = os.path.join(
        os.path.dirname(os.path.abspath(__file__)), "test_avro", "test.bin"
    )
    filename = "file://" + filename
    schema_filename = os.path.join(
        os.path.dirname(os.path.abspath(__file__)), "test_avro", "cpx.json"
    )
    with open(schema_filename) as f:
        schema = f.read()
    for _ in [1, 2, 3, 11, 12, 13, 50, 51, 100]:  # capacity
        re_dataset = tfio.IODataset.from_avro(filename, schema, ["re"])
        i = 0
        for v in re_dataset:
            re = v
            assert re.numpy() == 100.0 * i
            i += 1
        assert i == 100
        im_dataset = tfio.IODataset.from_avro(filename, schema, ["im"])
        i = 0
        for v in im_dataset:
            im = v
            assert im.numpy() == 100.0 + i
            i += 1
        assert i == 100