Insert **layer** into the font. ::

            >>> layer = font.insertLayer(otherLayer, name="layer 2")

        This will not insert the layer directly.
        Rather, a new layer will be created and the data from
        **layer** will be copied to to the new layer. **name**
        indicates the name that should be assigned to the layer
        after insertion. If **name** is not given, the layer's
        original name must be used. If the layer does not have
        a name, an error must be raised. The data that will be
        inserted from **layer** is the same data as documented
        in :meth:`BaseLayer.copy`.

def insertLayer(self, layer, name=None):
        """
        Insert **layer** into the font. ::

            >>> layer = font.insertLayer(otherLayer, name="layer 2")

        This will not insert the layer directly.
        Rather, a new layer will be created and the data from
        **layer** will be copied to to the new layer. **name**
        indicates the name that should be assigned to the layer
        after insertion. If **name** is not given, the layer's
        original name must be used. If the layer does not have
        a name, an error must be raised. The data that will be
        inserted from **layer** is the same data as documented
        in :meth:`BaseLayer.copy`.
        """
        if name is None:
            name = layer.name
        name = normalizers.normalizeLayerName(name)
        if name in self:
            self.removeLayer(name)
        return self._insertLayer(layer, name=name)