code: def fit_fn(epochs):
      def fn(
          model,
          data_module,
          steps_per_epoch,
          validation_steps,
          callbacks,
          verbose,
      ):
          with data_module as dm:
              return model.fit(
                  dm.train_data(),
                  validation_data=dm.val_data() if dm.has_val else None,
                  steps_per_epoch=steps_per_epoch,
                  validation_steps=validation_steps,
                  callbacks=callbacks,
                  verbose=verbose,
                  epochs=epochs,
              )
  
      return fn
  
imports: import io
  from packaging import version
  import h5py
  import numpy
  import tensorflow
  from horovod.runner.common.util import codec
  from horovod.spark.common import constants, params
  from horovod.spark.keras import optimizer, remote
label_desc: Use image node_id 1 for calling the TFKerasUtil obj's underlying member method code with example usage: obj.fit_fn(epochs) and returns: fn, model