code: def save(self, filename, driver=None, schema=None):
          
          if driver is None:
              driver = DRIVERS.get(os.path.splitext(filename)[-1])
  
          if schema is None:
              schema = self.schema
  
          if driver == "GeoJSON":
              # Workaround for https://github.com/Toblerity/Fiona/issues/438
              # https://stackoverflow.com/a/27045091/554319
              with contextlib.suppress(FileNotFoundError):
                  os.remove(filename)
  
              crs = WGS84_CRS
          else:
              crs = self.crs
  
          with fiona.open(filename, 'w', driver=driver, schema=schema, crs=crs) as sink:
              for feature in self:
                  new_feature = self._adapt_feature_before_write(feature)
                  sink.write(new_feature.to_record(crs))
docs: Saves collection to file.