def _insertLayer(self, layer, name, **kwargs):
        """
        This is the environment implementation of :meth:`BaseFont.insertLayer`.
        This must return an instance of a :class:`BaseLayer` subclass.
        **layer** will be a layer object with the attributes necessary
        for copying as defined in :meth:`BaseLayer.copy` An environment
        must not insert **layer** directly. Instead the data from **layer**
        should be copied to a new layer. **name** will be a :ref:`type-string`
        representing a glyph layer. It will have been normalized with
        :func:`normalizers.normalizeLayerName`. **name** will have been
        tested to make sure that no layer with the same name exists in the font.

        Subclasses may override this method.
        """
        if name != layer.name and layer.name in self.layerOrder:
            layer = layer.copy()
            layer.name = name
        dest = self.newLayer(name)
        dest.copyData(layer)
        return dest