function isValidCallee(val: string): boolean {
  return (VALID_CALLEES as $ReadOnlyArray<string>).includes(val);
}
This is a extended version of the path evaluation code from Babel.

The original can be found at:
https://github.com/babel/babel/blob/main/packages/babel-traverse/src/path/evaluation.ts

The following extensions were made:
- It can accept a mapping from variable names to functions
  which when encountered will be evaluated instead of deopting.
  - The functions can be configured to accept the raw path instead of
    static values to handle dynamic values.
- It can handle object spreads when the spread value itself is statically evaluated.