define<O>  method 
Defines instantiator and cache-validator for key.
Implementation
void define<O>(String key, O Function() instantiator,
    [bool Function(Object o)? cacheValidator]) {
  _cacheInstantiators[key] = instantiator;
  if (cacheValidator != null) {
    _cacheValidators[key] = cacheValidator;
  }
}