code: def dump(self, value, f):
      try:
          value.saveModel(f.name, over_write=True)
      except Exception as e:
          msg = (
              "Could not serialize broadcast: %s" % e.__class__.__name__
          )
          if not self.sc.version.startswith("2.1"):
              from pyspark.cloudpickle import print_exec
          else:
              from pyspark.util import print_exec
          print_exec(sys.stderr)
          invalidInputError(False, msg)
      f.close()
      return f.name
  
file_path: BigDL/python/dllib/src/bigdl/dllib/models/utils/model_broadcast.py
imports: import os
  import sys
  import gc
  from tempfile import NamedTemporaryFile
  from pyspark.broadcast import Broadcast
  from pyspark.broadcast import _from_id
  from bigdl.dllib.nn.layer import Model
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 2 for calling the ModelBroadcast obj's underlying member method code with example usage: obj.dump(value, f) and returns: f