def main(world_folder):
    world = AnvilWorldFolder(world_folder)  # Not supported for McRegion
    if not world.nonempty():  # likely still a McRegion file
        sys.stderr.write("World folder %r is empty or not an Anvil formatted world\n" % world_folder)
        return 65  # EX_DATAERR
    biome_totals = [0]*256 # 256 counters for 256 biome IDs
    
    try:
        for chunk in world.iter_nbt():
            for biomeid in chunk["Level"]["Biomes"]:
                biome_totals[biomeid] += 1

    except __HOLE__:
        print_results(biome_totals)
        return 75 # EX_TEMPFAIL
    
    print_results(biome_totals)
    return 0 # NOERR
dataset/ETHPy150Open twoolie/NBT/examples/biome_analysis.py/main