def _extract(self, exprs, context, n):
    exclude = {i.source.indexed for i in context[None].scope.d_flow.independent()}
    mapper = Uxmapper()
    for e in exprs:
        for i in search_potential_deriv(e, n):
            if (i.free_symbols & exclude):
                continue
            key = (lambda a: a.is_Add)
            (terms, others) = split(i.args, key)
            if self._opt_maxalias:
                if ((e.grid is not None) and terms):
                    key = partial(maybe_coeff_key, e.grid)
                    (others, more_terms) = split(others, key)
                    terms += more_terms
            mapper.add(i, self._make_symbol, terms)
    return mapper
def _extract(self, exprs, context, n):
    exclude = {i.source.indexed for i in context[None].scope.d_flow.independent()}
    mapper = Uxmapper()
    for e in exprs:
        for i in search_potential_deriv(e, n):
            if (i.free_symbols & exclude):
                continue
            key = (lambda a: a.is_Add)
            (terms, others) = split(i.args, key)
            if self._opt_maxalias:
                if ((e.grid is not None) and terms):
                    key = partial(maybe_coeff_key, e.grid)
                    (others, more_terms) = split(others, key)
                    terms += more_terms
            mapper.add(i, self._make_symbol, terms)
    return mapper