def _precedence_parens(self, node, child, is_left=True):
        """Wrap child in parens only if required to keep same semantics"""
        if self._should_wrap(node, child, is_left):
            return "(%s)" % child.accept(self)

        return child.accept(self)
Wrap child in parens only if required to keep same semantics