@cacheit
def _simplify_delta(expr):
    from sympy.solvers import solve
    if isinstance(expr, KroneckerDelta):
        try:
            slns = solve(expr.args[0] - expr.args[1], dict=True)
            if slns and len(slns) == 1:
                return Mul(*[KroneckerDelta(*(key, value))
                            for key, value in slns[0].items()])
        except NotImplementedError:
            pass
    return expr
Write ``content`` to disk at ``filename``. Files with appropriate extensions
dataset/ETHPy150Open sympy/sympy/sympy/concrete/delta.py/_simplify_delta--crossover with--dataset/ETHPy150Open chartbeat-labs/textacy/textacy/fileio/write.py/write_file