function getTranslator(identity) {
  var instance = identity instanceof _core.default ? identity : getIdentity(identity);
  var singleton;

  if (translatorSingletons.has(instance)) {
    singleton = translatorSingletons.get(instance);
  } else {
    singleton = new RecordTranslator(instance);
    translatorSingletons.set(instance, singleton);
  }

  return singleton;
}
Returns a cached instance of RecordTranslator or create the new one for given identity.

@param {*} identity
@returns {RecordTranslator}