code: def zipadd(func, zip_file, name):
      """Calls a function with a file object, saving it to a zip file.
  
      :param func: The function to call.
      :type func: callable
  
      :param zip_file: The zip file that `func` should write its data to.
      :type zip_file: :class:`zipfile.ZipFile`
  
      :param name: The name of the file inside of the zipped archive that `func`
          should save its data to.
      :type name: str
  
      """
      with tempfile.NamedTemporaryFile("wb", delete=False) as temp_file:
          func(temp_file)
          temp_file.close()
          zip_file.write(temp_file.name, arcname=name)
      if os.path.isfile(temp_file.name):
          os.remove(temp_file.name)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import os
  import pickle
  import sys
  import tempfile
  import zipfile
  import warnings
  from collections import defaultdict
  from contextlib import closing
  from pickle import HIGHEST_PROTOCOL
  from six import BytesIO
  import theano
  from theano import config
  from theano.compat import PY3
  from six import string_types
  from theano.compile.sharedvalue import SharedVariable
label_desc: Use image node_id 4 for calling a global function with example usage: zipadd(func, zip_file, name) without return types