Returns true if the provided types are valid for dict_to_object conversion

    Explicitly declare that we are not able to parse collections nor able to create an object from a dictionary if the
    object's constructor is non correctly PEP484-specified.

    None should be treated as a Joker here (but we know that never from_type and to_type will be None at the same time)

    :param strict_mode:
    :param from_type:
    :param to_type:
    :return:

def __is_valid_for_dict_to_object_conversion(strict_mode: bool, from_type: Type, to_type: Type) -> bool:
    """
    Returns true if the provided types are valid for dict_to_object conversion

    Explicitly declare that we are not able to parse collections nor able to create an object from a dictionary if the
    object's constructor is non correctly PEP484-specified.

    None should be treated as a Joker here (but we know that never from_type and to_type will be None at the same time)

    :param strict_mode:
    :param from_type:
    :param to_type:
    :return:
    """
    # right now we're stuck with the default logger..
    logr = default_logger

    if to_type is None or is_any_type(to_type):
        # explicitly handle the 'None' (joker) or 'any' type
        return True

    elif is_collection(to_type, strict=True):
        # if the destination type is 'strictly a collection' (not a subclass of a collection) we know that we can't
        # handle it here, the constructor is not pep484-typed
        return False

    else:
        # (1) Try the type itself
        try:
            # can we find enough pep-484 information in the constructor to be able to understand what is required ?
            get_constructor_attributes_types(to_type)
            return True
        except TypeInformationRequiredError as main_e:
            # # failed: we cant guess the required types of constructor arguments
            # if strict_mode:
            #     # Warning and return NO
            #     if should_display_warnings_for(to_type):
            #         logr.warn('Object constructor signature for type {} does not allow parsyfiles to '
            #                    'automatically create instances from dict content. Caught {}: {}'
            #                    ''.format(get_pretty_type_str(to_type), type(main_e).__name__, main_e))
            #     return False
            #
            # # non-strict mode: (2) Check if any subclasses exist
            # subclasses = get_all_subclasses(to_type)
            # if len(subclasses) > GLOBAL_CONFIG.dict_to_object_subclass_limit:
            #     logr.warn('WARNING: Type {} has {} subclasses, only {} will be tried by parsyfiles when attempting to '
            #               'create it from a subclass. You can raise this limit by setting the appropriate option with '
            #               '`parsyfiles_global_config()`'
            #               ''.format(to_type, len(subclasses), GLOBAL_CONFIG.dict_to_object_subclass_limit))
            #
            # # Then for each subclass also try (with a configurable limit in nb of subclasses)
            # for subclass in subclasses[0:GLOBAL_CONFIG.dict_to_object_subclass_limit]:
            #     try:
            #         get_constructor_attributes_types(subclass)
            #         # OK, but issue warning for the root type still
            #         if should_display_warnings_for(to_type):
            #             logr.warn('WARNING: Object constructor signature for type {} does not allow parsyfiles to '
            #                       'automatically create instances from dict content, but it can for at least one of '
            #                       'its subclasses ({}) so it might be ok for you. Caught {}: {}'
            #                       ''.format(get_pretty_type_str(to_type), get_pretty_type_str(subclass),
            #                                  type(main_e).__name__, main_e))
            #         return True
            #     except TypeInformationRequiredError as e:
            #         # failed: we cant guess the required types of constructor arguments
            #         if should_display_warnings_for(to_type):
            #             logr.warn('WARNING: Object constructor signature for type {} does not allow parsyfiles to '
            #                       'automatically create instances from dict content. Caught {}: {}'
            #                       ''.format(subclass, type(e).__name__, e))
            #
            # # Nothing succeeded

            if should_display_warnings_for(to_type):
                logr.warn('WARNING: Object constructor signature for type {} does not allow parsyfiles to '
                          'automatically create instances from dict content. Caught {}: {}'
                          ''.format(get_pretty_type_str(to_type), type(main_e).__name__, main_e))

            return False