function createExternMethod(node) {
  // Example code: foo.bar = class {
  //   baz() { ... }
  // };
  // Example node: {
  //   leadingComments: [ ... ],
  //   static: false,
  //   key: Identifier,
  //   value: FunctionExpression,
  // }
  const id = getIdentifierString(node.key);
  let comment = getLeadingBlockComment(node);
  if (!comment) {
    if (id == 'constructor') {
      // ES6 constructors don't necessarily need comments; a comment along the
      // lines of "Creates a Foo object." doesn't really add anything.
      comment = '';
    } else {
      throw new Error('No leading block comment for: ' + id);
    }
  }
  comment = removeExportAnnotationsFromComment(comment);

  const params = getFunctionParameters(node.value);

  let methodString = (comment ? '  ' + comment + '\n' : '') + '  ';
  if (node.static) {
    methodString += 'static ';
  }
  methodString += id + '(' + params.join(', ') + ') {}';
  return methodString;
}
@param {ASTNode} node A method node from the abstract syntax tree.
@return {string} The extern string for this method.