def _create_essential_callbacks(model, horovod=None, eval_state_per_batches=None):
        """
        :param model: a model object, typically `self`
        :param horovod: if not None, adds callback for model params broadcasting between workers
        :param eval_state_per_batches: if not None, adds callback to evaluate the model every `eval_state_per_batches`
                batches
        :return: a list of callbacks
        """
        callbacks = []

        if horovod:
            callbacks.append(
                ParametrizedCallback(
                    horovod.callbacks.BroadcastGlobalVariablesCallback(0), runs_only_on_main_worker=False))

        if eval_state_per_batches:
            callbacks.append(EvaluateAndSaveBestIntermediateModelCallback(model, eval_state_per_batches))

        return callbacks

        :param model: a model object, typically `self`
        :param horovod: if not None, adds callback for model params broadcasting between workers
        :param eval_state_per_batches: if not None, adds callback to evaluate the model every `eval_state_per_batches`
                batches
        :return: a list of callbacks
        
cakechat/dialog_model/keras_model.py