code: def _serialize_param_value(
      param_name, param_val, serialize_model_fn, serialize_opt_fn
  ):
      if param_val is None:
          return param_val
  
      if param_name in [
          params.EstimatorParams.backend.name,
          params.EstimatorParams.store.name,
      ]:
          # We do not serialize backend and store. These params have to be regenerated for each
          # run of the pipeline
          return None
      elif param_name == params.EstimatorParams.model.name:
          return serialize_model_fn(param_val)
      if param_name == params.EstimatorParams.optimizer.name:
          return serialize_opt_fn(param_val)
      else:
          return codec.dumps_base64(param_val)
  
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 3 for calling a global function with example usage: _serialize_param_value(param_name, param_val, serialize_model_fn, serialize_opt_fn) and returns: param_val, None, serialize_opt_fn, codec, serialize_model_fn