code: def transform_six_add_metaclass(node):
      
      if not node.decorators:
          return
  
      for decorator in node.decorators.nodes:
          if not isinstance(decorator, nodes.Call):
              continue
  
          try:
              func = next(decorator.func.infer())
          except InferenceError:
              continue
          if func.qname() == SIX_ADD_METACLASS and decorator.args:
              metaclass = decorator.args[0]
              node._metaclass = metaclass
              return node
docs: Check if the given class node is decorated with *six.add_metaclass*
  
      If so, inject its argument as the metaclass of the underlying class.