function* iterateDefineModels(globalScope) {
  for (const { identifier } of iterateMacroReferences()) {
    if (
      identifier.parent.type === 'CallExpression' &&
      identifier.parent.callee === identifier
    ) {
      yield {
        node: identifier.parent
      }
    }
  }

  /**
   * Iterate macro reference.
   * @returns {Iterable<Reference>}
   */
  function* iterateMacroReferences() {
    const variable = globalScope.set.get('defineModel')
    if (
      variable &&
      variable.defs.length === 0 /* It was automatically defined. */
    ) {
      yield* variable.references
    }
    for (const ref of globalScope.through) {
      if (ref.identifier.name === 'defineModel') {
        yield ref
      }
    }
  }
}
Iterate the call expressions that defineModel() macro.
@param {import('eslint').Scope.Scope} globalScope
@returns {Iterable<{ node: CallExpression }>}