code: def derivative(self, x):
          
          if self.is_linear:
              return self
          else:
              left = self.right(x) * self.left.derivative(x)
              right = self.left(x) * self.right.derivative(x)
              return left + right
docs: Return the derivative at ``x``.