import meshlib.mrmeshpy as mrmeshpy
mesh_a = mrmeshpy.loadMesh("meshAwithHole.stl")
mesh_b = mrmeshpy.loadMesh("meshBwithHole.stl")
mesh = mrmeshpy.mergeMeshes([mesh_a, mesh_b])
edges = mesh.topology.findHoleRepresentiveEdges()
params = mrmeshpy.StitchHolesParams()
params.metric = mrmeshpy.getUniversalMetric(mesh)
mrmeshpy.buildCylinderBetweenTwoHoles(mesh, edges[0], edges[1], params)
mrmeshpy.saveMesh(mesh, "stitchedMesh.stl")