@staticmethod<EOL><INDENT>def convert_collection_values_according_to_pep(coll_to_convert: Union[Dict, List, Set, Tuple],<EOL>desired_type: Type[T],<EOL>conversion_finder: '<STR_LIT>', logger: Logger, **kwargs)-> T:<DEDENT>
base_desired_type = get_base_generic_type(desired_type)<EOL>if issubclass(base_desired_type, Mapping):  <EOL><INDENT>item_typ, _ = _extract_collection_base_type(desired_type, exception_if_none=False)<EOL>if item_typ is None:<EOL><INDENT>return ConversionFinder.try_convert_value(conversion_finder, '<STR_LIT>', coll_to_convert, desired_type,<EOL>logger=logger, options=kwargs)<EOL><DEDENT>else:<EOL><INDENT>res = dict()<EOL>for key, val in coll_to_convert.items():<EOL><INDENT>res[key] = ConversionFinder.try_convert_value(conversion_finder, key, val, item_typ, logger,<EOL>options=kwargs)<EOL><DEDENT>return res<EOL><DEDENT><DEDENT>elif issubclass(base_desired_type, Sequence):  <EOL><INDENT>item_typ, _ = _extract_collection_base_type(desired_type, exception_if_none=False)<EOL>if item_typ is None:<EOL><INDENT>return ConversionFinder.try_convert_value(conversion_finder, '<STR_LIT>', coll_to_convert, desired_type,<EOL>logger=logger, options=kwargs)<EOL><DEDENT>else:<EOL><INDENT>res = list()<EOL>if type(item_typ) != tuple:<EOL><INDENT>for val in coll_to_convert:<EOL><INDENT>res.append(ConversionFinder.try_convert_value(conversion_finder, '<STR_LIT>', val, item_typ, logger,<EOL>options=kwargs))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if len(item_typ) == <NUM_LIT:1>:<EOL><INDENT>item_typ_tuple = item_typ * len(coll_to_convert)<EOL><DEDENT>elif len(item_typ) == len(coll_to_convert):<EOL><INDENT>item_typ_tuple = item_typ<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(len(coll_to_convert), item_typ))<EOL><DEDENT>for val, item_t in zip(coll_to_convert, item_typ_tuple):<EOL><INDENT>res.append(ConversionFinder.try_convert_value(conversion_finder, '<STR_LIT>', val, item_t, logger,<EOL>options=kwargs))<EOL><DEDENT>res = tuple(res)<EOL><DEDENT>return res<EOL><DEDENT><DEDENT>elif issubclass(base_desired_type, AbstractSet):  <EOL><INDENT>item_typ, _ = _extract_collection_base_type(desired_type, exception_if_none=False)<EOL>if item_typ is None:<EOL><INDENT>return ConversionFinder.try_convert_value(conversion_finder, '<STR_LIT>', coll_to_convert, desired_type,<EOL>logger=logger, options=kwargs)<EOL><DEDENT>else:<EOL><INDENT>res = set()<EOL>for val in coll_to_convert:<EOL><INDENT>res.add(ConversionFinder.try_convert_value(conversion_finder, '<STR_LIT>', val, item_typ, logger,<EOL>options=kwargs))<EOL><DEDENT>return res<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>' + str(desired_type))<EOL><DEDENT>
Helper method to convert the values of a collection into the required (pep-declared) value type in desired_type.
If desired_type does not explicitly mention a type for its values, the collection will be returned as is, otherwise
a  copy will be created and filled with conversions of the values, performed by the provided conversion_finder

:param coll_to_convert:
:param desired_type:
:param conversion_finder:
:param logger:
:param kwargs:
:return: