def are_worth_chaining(first_converter: Converter, second_converter: Converter) -> bool:
        """
        This is a generalization of Converter.are_worth_chaining(), to support ConversionChains.

        :param first_converter:
        :param second_converter:
        :return:
        """
        if isinstance(first_converter, ConversionChain):
            if isinstance(second_converter, ConversionChain):
                # BOTH are chains
                for sec_conv in second_converter._converters_list:
                    for fir_conv in first_converter._converters_list:
                        if not Converter.are_worth_chaining(fir_conv, sec_conv):
                            return False
            else:
                for fir_conv in first_converter._converters_list:
                    if not Converter.are_worth_chaining(fir_conv, second_converter):
                        return False
        else:
            if isinstance(second_converter, ConversionChain):
                for sec_conv in second_converter._converters_list:
                    if not Converter.are_worth_chaining(first_converter, sec_conv):
                        return False
            else:
                # Neither is a chain
                if not Converter.are_worth_chaining(first_converter, second_converter):
                    return False

        # finally return True if nothing proved otherwise
        return True
def are_worth_chaining ( first_converter : Converter , second_converter : Converter ) -> bool : if isinstance ( first_converter , ConversionChain ) : if isinstance ( second_converter , ConversionChain ) : for sec_conv in second_converter . _converters_list : for fir_conv in first_converter . _converters_list : if not Converter . are_worth_chaining ( fir_conv , sec_conv ) : return False else : for fir_conv in first_converter . _converters_list : if not Converter . are_worth_chaining ( fir_conv , second_converter ) : return False else : if isinstance ( second_converter , ConversionChain ) : for sec_conv in second_converter . _converters_list : if not Converter . are_worth_chaining ( first_converter , sec_conv ) : return False else : if not Converter . are_worth_chaining ( first_converter , second_converter ) : return False return True
This is a generalization of Converter.are_worth_chaining(), to support ConversionChains.

        :param first_converter:
        :param second_converter:
        :return: