code: def create_image_conversion_fn(max_outputs, categorical=False):
      """Binds the number of outputs to the image conversion fn (to svg or png)."""
  
      def convert_to_svg(decoder_output):
          converted = []
          for example in decoder_output:
              if len(converted) == max_outputs:
                  break
              converted.append(
                  vector_to_svg(example, True, categorical=categorical)
              )
          return np.array(converted)
  
      return convert_to_svg
  
imports: import io
  import numpy
  from PIL import Image
  from six.moves import zip_longest
  from skimage import draw
  import tensorflow.compat.v1
label_desc: Use image node_id 32 for calling a global function with example usage: create_image_conversion_fn(max_outputs, categorical) and returns: convert_to_svg, np