def METHOD_NAME(self, solid, thickness, mask):
    if not solid.isValid():
        raise Exception("Input solid is not valid")
    if self.mask_usage == 'REMOVE':
        mask = [not c for c in mask]
    if all(mask):
        self.info("No faces are selected to be removed; the node will operate as `Offset' operation")
    if not any(mask):
        raise Exception("Invalid faces mask: all faces are to be removed")
    mask = repeat_last_for_length(mask, len(solid.Faces))
    faces = [face for c, face in zip(mask, solid.Faces) if not c]
    try:
        shape = solid.makeThickness(faces, thickness, self.tolerance)
        return shape
    except Part.OCCError as e:
        raise Exception(f"FreeCAD API method failed: {e}. Incorrect faces mask?")