<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def are_worth_chaining(parser, to_type: Type[S], converter: Converter[S, T]) -> bool: """ Utility method to check if it makes sense to chain this parser with the given destination type, and the given converter to create a parsing chain. Returns True if it brings value to chain them. To bring value, * the converter's output should not be a parent class of the parser's output. Otherwise the chain does not even make any progress :) * The parser has to allow chaining (with converter.can_chain=True) :param parser: :param to_type: :param converter: :return: """

        if not parser.can_chain:
            # The base parser prevents chaining
            return False

        elif not is_any_type(to_type) and is_any_type(converter.to_type):
            # we gain the capability to generate any type. So it is interesting.
            return True

        elif issubclass(to_type, converter.to_type):
            # Not interesting : the outcome of the chain would be not better than one of the parser alone
            return False

        # Note: we dont say that chaining a generic parser with a converter is useless. Indeed it might unlock some
        # capabilities for the user (new file extensions, etc.) that would not be available with the generic parser
        # targetting to_type alone. For example parsing object A from its constructor then converting A to B might
        # sometimes be interesting, rather than parsing B from its constructor

        else:
            # Interesting
            return True