How do I export my biom object to a file in biom format?
You can use the functions to_hdf5 and to_json from the biom-format package:

to_hdf5

with biom.util.biom_open('output.biom', 'w') as f:
    merged_table.to_hdf5(f, "example")


to_json

with open('output.txt', 'w') as f:
    f.write(merged_table.to_json("example"))