def METHOD_NAME():
    args = parseArguments(sys.argv[1:])
    order_upsampling = 1; # 0 [nearest neighbor] or 1 [linear]
    # load settings
    if args.usesettings is None:
        args.usesettings = os.path.join(SIMNIBSDIR, 'charm.ini') # use standard settings
    if type(args.usesettings) == list:
        args.usesettings = args.usesettings[0]        
    settings = read_ini(args.usesettings)['mesh']
    if not settings['skin_tag']:
        settings['skin_tag'] = None
    if not settings['hierarchy']:
        settings['hierarchy'] = None
    # load label image
    label_nifti = nib.load(args.label_image)
    label_image = np.squeeze(label_nifti.get_fdata().astype(np.uint16)) # Cast to uint16, otherwise meshing complains
    label_affine = label_nifti.get_qform()
    # load sizing field (optional) 
    sf_image = None
    if args.fn_sizing_field is not None:
        if type(args.fn_sizing_field) == list:
                args.fn_sizing_field = args.fn_sizing_field[0]
        sf_nifti = nib.load(args.fn_sizing_field)
        sf_image = np.squeeze(sf_nifti.get_fdata())
        assert sf_image.shape == label_image.shape
    # upsample (optional)
    if args.voxsize_meshing is not None:
        logger.info('upsampling label image ...')
        if type(args.voxsize_meshing) == list:
                args.voxsize_meshing = args.voxsize_meshing[0]
        args.voxsize_meshing = float(args.voxsize_meshing)
        if sf_image is not None:
            sf_image, _, _ = resample_vol(sf_image, label_affine,
                                          args.voxsize_meshing, order=order_upsampling)
        if order_upsampling == 0:
            label_image, label_affine, _ = resample_vol(label_image, label_affine,
                                                        args.voxsize_meshing, order=0)
        else:
            labels = np.unique(label_image)
            best_tag_p, new_affine, _ = resample_vol((label_image==labels[0]).astype(np.float32), 
                                                     label_affine, args.voxsize_meshing, order=1)
            best_tag = np.zeros_like(best_tag_p,dtype=np.uint16)
            best_tag[:] = labels[0]
            for i in labels[1:]:
                tag_p = resample_vol((label_image==i).astype(np.float32), 
                                     label_affine, args.voxsize_meshing, order=1)[0]
                idx = tag_p > best_tag_p
                best_tag[idx] = i
                best_tag_p[idx] = tag_p[idx]
            label_image = best_tag
            label_affine = new_affine
    # reduce memory consumption a bit
    if sf_image is not None:
            sf_image, _, _ = crop_vol(sf_image, label_affine,
                                      label_image>0, thickness_boundary=5) 
    label_image, label_affine, _ = crop_vol(label_image, label_affine, 
                                            label_image>0, thickness_boundary=5) 
    # meshing
    new_mesh = create_mesh(label_image, label_affine,
                            elem_sizes=settings['elem_sizes'],
                            smooth_size_field=settings['smooth_size_field'],
                            skin_facet_size=settings['skin_facet_size'], 
                            facet_distances=settings['facet_distances'],
                            optimize=settings['optimize'], 
                            remove_spikes=settings['remove_spikes'], 
                            skin_tag=settings['skin_tag'],
                            hierarchy= settings['hierarchy'],
                            smooth_steps=settings['smooth_steps'],
                            sizing_field=sf_image)
    # write out mesh, .opt-file with some visualization settings and .ini-file with settings
    if not args.mesh_name.lower().endswith('.msh'):
        args.mesh_name+='.msh'
    write_msh(new_mesh, args.mesh_name)
    v = new_mesh.view(cond_list = cond.standard_cond())
    v.write_opt(args.mesh_name)
    try:
        shutil.copyfile(args.usesettings, args.mesh_name+'.ini')
    except shutil.SameFileError:
        pass