function buildRuleMappings(mappings = []) {
  return mappings.reduce((acc, attr) => {
    if (attr?.key && attr?.arguments && attr?.body) {
      // eslint-disable-next-line no-new-func,sonarjs/code-eval
      acc[attr.key] = new Function(attr.arguments, attr.body)
    }
    return acc
  }, {})
}
Builds a set of rules from an array of mappings.
Each mapping should have a key, arguments, and body.
The body should be a string that can be evaluated as a function.
@param {Array} mappings - Array of mappings with key, arguments, and body.
@returns {Object} - An object where each key maps to a function.