code: def _transform(self, node):
          
          cls = node.__class__
          if cls not in self.transforms:
              # no transform registered for this class of node
              return node
  
          transforms = self.transforms[cls]
          for transform_func, predicate in transforms:
              if predicate is None or predicate(node):
                  ret = transform_func(node)
                  # if the transformation function returns something, it's
                  # expected to be a replacement for the node
                  if ret is not None:
                      node = ret
                  if ret.__class__ != cls:
                      # Can no longer apply the rest of the transforms.
                      break
          return node
docs: Call matching transforms for the given node if any and return the
          transformed node.