function getParserServices(context) {
  return context.sourceCode ? context.sourceCode.parserServices : context.parserServices;
}
This function is API compatible with eslint v8.x and eslint v9 or later.
@see https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#from-context-to-sourcecode