function getLossOrMetricName(fn) {
	  assert$1(fn !== null, "Unknown LossOrMetricFn " + fn);

	  if (typeof fn === 'string') {
	    return fn;
	  } else {
	    var fnName;

	    for (var _i = 0, _Object$keys = Object.keys(lossesMap); _i < _Object$keys.length; _i++) {
	      var key = _Object$keys[_i];

	      if (lossesMap[key] === fn) {
	        fnName = key;
	        break;
	      }
	    }

	    if (fnName !== undefined) {
	      return fnName;
	    }

	    for (var _i2 = 0, _Object$keys2 = Object.keys(metricsMap); _i2 < _Object$keys2.length; _i2++) {
	      var _key = _Object$keys2[_i2];

	      if (metricsMap[_key] === fn) {
	        fnName = _key;
	        break;
	      }
	    }

	    if (fnName !== undefined) {
	      return fnName;
	    }

	    return fn.name;
	  }
	}
Get the shortcut function name.

If the fn name is a string,
  directly return the string name.
If the function is included in metricsMap or lossesMap,
  return key of the map.
  - If the function relative to multiple keys,
    return the first found key as the function name.
  - If the function exists in both lossesMap and metricsMap,
    search lossesMap first.
If the function is not included in metricsMap or lossesMap,
  return the function name.

@param fn loss function, metric function, or short cut name.
@returns Loss or Metric name in string.