code: def _should_wrap(self, node, child, is_left):
          
          node_precedence = node.op_precedence()
          child_precedence = child.op_precedence()
  
          if node_precedence > child_precedence:
              # 3 * (4 + 5)
              return True
  
          if (
              node_precedence == child_precedence
              and is_left != node.op_left_associative()
          ):
              # 3 - (4 - 5)
              # (2**3)**4
              return True
  
          return False
docs: Wrap child if:
              - it has lower precedence
              - same precedence with position opposite to associativity direction