code: def export_saved_model(model, export_dir, is_chief=False):
      if version.parse(tf.__version__) < version.parse("2.1.0"):
          if is_chief:
              tf.keras.experimental.export_saved_model(
                  model, export_dir
              )
      else:
          # non-chief nodes save to dummy location on local disk
          export_dir = export_dir if is_chief else "worker_model"
          model.save(export_dir, save_format="tf")
  
imports: import tensorflow
  from packaging import version
label_desc: Use image node_id 1 for calling a global function with example usage: export_saved_model(model, export_dir, is_chief) without return types