<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def slice_transform(func, self, X, *vargs, **kwargs):
 """ Decorator for implementing partial application. This must decorate the ``transform`` and ``grad`` methods of basis objects if the ``slice_init`` decorator was used. """

    X = X if self.apply_ind is None else X[:, self.apply_ind]
    return func(self, X, *vargs, **kwargs)