addKeyAttribute = function(babelTypes, node, keyValue) {
  var keyFound = false;

  node.openingElement.attributes.forEach(function(attrib) {
    if (babelTypes.isJSXAttribute(attrib) && attrib.name.name === "key") {
      keyFound = true;
      return false;
    }
  });

  if (!keyFound) {
    var keyAttrib = babelTypes.jSXAttribute(babelTypes.jSXIdentifier("key"), babelTypes.stringLiteral("" + keyValue));
    node.openingElement.attributes.push(keyAttrib);
  }
}
Adds attribute "key" to given node, if not already preesent.

@param {object} babelTypes - Babel lib
@param {JSXElement} node - Current node to which the new attribute is added
@param {string} keyValue - Value of the key