'Returns True if the expression needs to be wrapped in brackets when
passed as an argument to a function, False otherwise. This is a more
liberal version of _needs_brackets, in that many expressions which need
to be wrapped in brackets when added/subtracted/raised to a power do
not need them when passed to a function. Such an example is a*b.'

def _needs_function_brackets(self, expr):

    if (not self._needs_brackets(expr)):
        return False
    elif (expr.is_Mul and (not self._mul_is_clean(expr))):
        return True
    elif (expr.is_Pow and (not self._pow_is_clean(expr))):
        return True
    elif (expr.is_Add or expr.is_Function):
        return True
    else:
        return False
