def __init__(self, callback, runs_only_on_main_worker, callback_params=None):
        """
        :param callback: arbitrary callback object (e.g. instance of `keras.callbacks.Callback`)
        :param runs_only_on_main_worker: True, if this callback runs only on main worker (in case of distributed
                training), False otherwise
        :param callback_params: dict of params that affect the resulting model
        :return:
        """
        super(ParametrizedCallback, self).__init__()
        self._callback = callback
        self._callback_params = callback_params or {}
        self._runs_only_on_main_worker = runs_only_on_main_worker

        :param callback: arbitrary callback object (e.g. instance of `keras.callbacks.Callback`)
        :param runs_only_on_main_worker: True, if this callback runs only on main worker (in case of distributed
                training), False otherwise
        :param callback_params: dict of params that affect the resulting model
        :return:
        
cakechat/dialog_model/abstract_callbacks.py