def _apply_inplace(self, x, **kwargs):
        r"""
        Applies this transform to a :map:`Transformable` ``x`` destructively.

        Any ``kwargs`` will be passed to the specific transform :meth:`_apply`
        method.

        Note that this is an inplace operation that should be used sparingly,
        by internal API's where creating a copy of the transformed object is
        expensive. It does not return anything, as the operation is inplace.

        Parameters
        ----------
        x : :map:`Transformable`
            The :map:`Transformable` object to be transformed.
        kwargs : `dict`
            Passed through to :meth:`_apply`.
        """

        def transform(x_):
            """
            Local closure which calls the :meth:`_apply` method with the
            `kwargs` attached.
            """
            return self._apply(x_, **kwargs)

        try:
            x._transform_inplace(transform)
        except __HOLE__:
            raise ValueError('apply_inplace can only be used on Transformable'
                             ' objects.')
dataset/ETHPy150Open menpo/menpo/menpo/transform/base/__init__.py/Transform._apply_inplace