code: def make_mesh( coor, ngroups, conns, mesh_in ):
      
      mat_ids = []
      for ii, conn in enumerate( conns ):
          mat_id = nm.empty( (conn.shape[0],), dtype = nm.int32 )
          mat_id.fill( mesh_in.mat_ids[ii][0] )
          mat_ids.append( mat_id )
          
      mesh_out = Mesh.from_data( 'merged mesh', coor, ngroups, conns,
                                 mat_ids, mesh_in.descs )
      return mesh_out
docs: Create a mesh reusing mat_ids and descs of mesh_in.