'Args:
extension (str): represents a valid extension type.
Returns:
list: A list of indices of \'exts\' where extension of
type \'extension\' is present.
Examples
>>> from sympy.integrals.risch import DifferentialExtension
>>> from sympy import log, exp
>>> from sympy.abc import x
>>> DE = DifferentialExtension(log(x) + exp(x), x, handle_first=\'exp\')
>>> DE.indices(\'log\')
[2]
>>> DE.indices(\'exp\')
[1]'

def indices(self, extension):

    return [i for (i, ext) in enumerate(self.exts) if (ext == extension)]
