<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def construct_rest_of_world(self, excluded, name=None, fp=None, geom=True):
 """Construct rest-of-world geometry and optionally write to filepath ``fp``. Excludes faces in location list ``excluded``. ``excluded`` must be an iterable of location strings (not face ids)."""

        for location in excluded:
            assert location in self.locations, "Can't find location {}".format(location)
        included = self.all_faces.difference(
            set().union(*[set(self.data[loc]) for loc in excluded])
        )

        if not geom:
            return included
        elif not gis:
            warn(MISSING_GIS)
            return

        geom = _union(included)[1]
        if fp:
            self.write_geoms_to_file(fp, [geom], [name] if name else None)
            return fp
        else:
            return geom