function getTypeFromMap(subtype, compositionType, expandTypesMap = {}) {
  const typeMap = deepmerge(DTCGTypesMap, expandTypesMap);
  // the map might exist within the compositionType
  const mapObjForComp = typeMap[compositionType];
  // or instead, it may be on the top-level, independent of the compositionType
  const mappedSubType = typeMap[subtype];
  if (typeof mapObjForComp === 'object' && mapObjForComp[subtype]) {
    return mapObjForComp[subtype];
    // the type mapping might be on the top-level, independent of the compositionType
  } else if (typeof mappedSubType === 'string') {
    return mappedSubType;
  }
  return subtype;
}
expandTypesMap and this function may be slightly confusing,
refer to the unit tests for a better explanation
@param {string} subtype
@param {string} compositionType
@param {Expand['typesMap']} expandTypesMap
@returns {string}