code: function normalize(reasons: { [string]: (Change, context: any) => any }): * {
      return (change, reason, context) => {
          const reasonFn = reasons[reason];
          if (reasonFn) {
              reasonFn(change, context);
          }
      };
  }
docs: /*
  Allows to define a normalize function through a keyed collection of functions