static isAMD(nodes) {
    var hasAMDName = function(node) {
      if (!node || !node.name) return;
      return (node.name === 'define' || node.name === 'require');
    }

    // Iterate from last node
    for (let i = nodes.length - 1; i >= nodes.length - 5; i--) {
      if (!nodes[i]) {
        return false;
      } else if (nodes[i].type !== 'ExpressionStatement' ||
          nodes[i].expression.type !== 'CallExpression') {
        continue;
      }

      // Handle basic cases where define/require are a property
      let callee = nodes[i].expression.callee;
      if (hasAMDName(callee)) {
        return true;
      } else if (callee.type === 'MemberExpression' &&
          hasAMDName(callee.property)) {
        return true;
      }
    }

    return false;
  }
Returns whether or not the nodes are part of an AMD require or define
expression.

@param   {Node[]}  nodes
@returns {boolean}