code: def _is_valid_for_dict_to_object_conversion(strict_mode: bool, from_type: Type, to_type: Type) -> bool:
      
      # cache previous results
      try:
          res, subclasses_hash = _cache_valid_for_dict_to_object[to_type][strict_mode]
          # Check if are any new subclasses are available
          if not strict_mode and to_type is not None and not is_any_type(to_type):
              if hash(tuple(get_all_subclasses(to_type))) != subclasses_hash:
                  raise KeyError('fake error to recompute the cache entry')
      except KeyError:
          res = __is_valid_for_dict_to_object_conversion(strict_mode=strict_mode, from_type=from_type, to_type=to_type)
          # Store an entry in the cache containing the result and the hash of the subclasses list
          subclasses_hash = None
          if not strict_mode and to_type is not None and not is_any_type(to_type):
              subclasses_hash = hash(tuple(get_all_subclasses(to_type)))
          entry = (res, subclasses_hash)
          try:
              _cache_valid_for_dict_to_object[to_type][strict_mode] = entry
          except KeyError:
              _cache_valid_for_dict_to_object[to_type] = {strict_mode: entry}
      return res
docs: 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: