Nope. Just calls calibre's convert. Literally.
Code:
from calibre.ebooks.conversion.cli import main as ebook_convert_cli_main
...
container = get_container(fn)
if container.opf_version_parsed.major >= 3:
print("=" * 50)
print("Found EPUB3 for %s, automatically creating a temporary EPUB2 for merging...\n"%title)
# this temp file is deleted when the BG process quits,
# so don't expect it to still be there.
epub2 = PersistentTemporaryFile(prefix="epub2_",
suffix=".epub",
dir=args['tdir'])
fn2 = epub2.name
# ebook-convert epub3.epub epub2.epub --epub-version=2
ebook_convert_cli_main(['epubmerge calling convert',fn,fn2,'--epub-version=2','--no-default-epub-cover'])
args['inputepubfns'][j] = fn2
print("Converted to temporary EPUB2: %s"%fn2)