def METHOD_NAME(self, layername, grassmapname=False, force=False):
    """
    Write out a given layer to a GRASS map file
    @param string name of the layer to be exported
    @param string optional name of the GRASS map file to be written
    @param boolean optional, whether an existing file may be overwritten
    """
    if not grassmapname:
        if layername in self.grassmapnames:
            grassmapname = self.grassmapnames[layername]
        else:
            raise error.DataError(Grassland.ME, "Grass Map name is empty.")
    if layername in self.layers:
        if grassmapname in grass.list_strings("rast"):
            if force:
                force = "force"
            else:
                raise error.DataError(Grassland.ME, "Grass map already exists.")
        self.layers[layername].write(grassmapname, overwrite=force)
    else:
        raise error.DataError(Grassland.ME, "Layer is not in list.")