def METHOD_NAME(fc_file, verts, faces, part_name, solid, mod):
    try:
        from os.path import exists
        Fname = bpy.path.display_name_from_filepath(fc_file)
        if not exists(fc_file):
            doc = F.newDocument(Fname)
            doc.recompute()
            doc.saveAs(fc_file) # using full filepath, saveAs also sets doc.FileName internally
        F.open(fc_file)
    except Exception as err:
        sv_logger.info(f'FCStd open error, {err}')
        return
    F.setActiveDocument(Fname)
    fc_root = F.getDocument(Fname)
    obj_names = set( [ i.Name for i in fc_root.Objects] )
    part_name += '_sv_' #->suffix added to avoid deleting freecad objects erroneously
    # SEARCH the freecad project for previous writed parts from this node
    if part_name in obj_names: #if the part name is numberless is detected as single
        fc_root.removeObject(part_name)
    else:
        for name in obj_names: #if not, check the fc project if there are parts with same root name
            if part_name in name:
                fc_root.removeObject(name)
    ############### if there, previous writed parts are removed ####################
    ############### so then write them again...
    if mod == 'solid': #EXPORT SOLID 
        for i, s in enumerate(solid):      
            new_part = F.ActiveDocument.addObject( "Part::Feature",part_name+str(i) ) #multiple: give numbered name
            new_part.Shape = s
    else: #EXPORT MESH
        import Mesh
        for i in range(len(verts)):
            temp_faces = faces[i]
            temp_verts = verts[i]
            meshdata = []
            for f in temp_faces:
                v1,v2,v3 = f[0],f[1],f[2]
                meshdata.append( temp_verts[v1] )
                meshdata.append( temp_verts[v2] )
                meshdata.append( temp_verts[v3] )
            mesh = Mesh.Mesh( meshdata )
            obj = F.ActiveDocument.addObject( "Mesh::Feature", part_name+str(i) )
            obj.Mesh = mesh
    F.ActiveDocument.recompute()
    F.getDocument(Fname).save()
    F.closeDocument(Fname)