function isStaticPath(node) {
    const pathInfo = getImportAccessPath({
      node: node.type === 'CallExpression' ? node.callee : node,
      scope,
      packageNames: PATH_PACKAGE_NAMES,
    });
    if (!pathInfo) {
      return false;
    }
    /** @type {string | undefined} */
    let name;
    if (pathInfo.path.length === 1) {
      // e.g. import path from 'path'
      name = pathInfo.path[0];
    } else if (pathInfo.path.length === 2 && pathInfo.path[0] === 'posix') {
      // e.g. import { posix as path } from 'path'
      name = pathInfo.path[1];
    }
    if (name == null) {
      return false;
    }

    if (node.type === 'CallExpression') {
      if (!PATH_CONSTRUCTION_METHOD_NAMES.has(name)) {
        return false;
      }
      return Boolean(node.arguments.length) && node.arguments.every(isStatic);
    }

    return PATH_STATIC_MEMBER_NAMES.has(name);
  }
Checks whether the given expression is a static path construction.

@param {import("estree").Expression} node The node to check.
@returns {boolean} if true, the given expression is a static path construction.