function makeFilter(scope) {
  const { attributeFilter } = Config.getInstance()
  if (scope === 'transaction') {
    return (d, k) => attributeFilter.filterTransaction(d, k)
  } else if (scope === 'segment') {
    return (d, k) => attributeFilter.filterSegment(d, k)
  }
}
Creates a filter function for the given scope.

@param {string} scope - The scope of the filter to make.
@returns {Function} A function that performs attribute filtering for the given
 scope.