def __init__(self, from_type: Type[S], to_type: Type[T],<EOL>is_able_to_convert_func: Callable[[bool, Type[S], Type[T]], bool] = None,<EOL>can_chain: bool = True):
<EOL>self.from_type = get_validated_type(from_type, '<STR_LIT>')<EOL>if from_type is AnyObject:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>self.to_type = get_validated_type(to_type, '<STR_LIT>')<EOL>check_var(is_able_to_convert_func, var_types=Callable, var_name='<STR_LIT>',<EOL>enforce_not_none=False)<EOL>if is_able_to_convert_func is not None:<EOL><INDENT>try:<EOL><INDENT>res = is_able_to_convert_func(True, from_type=None, to_type=None)<EOL>if not res:<EOL><INDENT>raise ValueError('<STR_LIT>' + str(is_able_to_convert_func) + '<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>raise ValueError('<STR_LIT>' + str(is_able_to_convert_func)<EOL>+ '<STR_LIT>' + str(e)).with_traceback(e.__traceback__)<EOL><DEDENT><DEDENT>self.is_able_to_convert_func = is_able_to_convert_func<EOL>check_var(can_chain, var_types=bool, var_name='<STR_LIT>')<EOL>self.can_chain = can_chain<EOL>
Constructor for a converter from one source type (from_type) to one destination type (to_type).
from_type may be any type except AnyObject or object. to_type may be AnyObject.

A custom function may be provided to enable converters to reject some conversions, even if the provided type
is a subclass of their source type and the expected type is a parent class of their dest type (or their dest
type is 'AnyObject').

:param from_type: the source type
:param to_type: the destination type, or AnyObject (for generic converters)
:param is_able_to_convert_func: an optional function taking a desired object type as an input and outputting a
boolean. It will be called in 'is_able_to_convert'. This allows implementors to reject some conversions even if
they are compliant with their declared 'to_type'. Implementors should handle a 'None' value as a joker
:param can_chain: a boolean (default True) indicating if other converters can be appended at the end of this
converter to create a chain. Dont change this except if it really can never make sense.