code: def vector_to_svg(vectors, stop_at_eos=False, categorical=False):
      """Tranforms a given vector to an svg string."""
      new_path = []
      for vector in vectors:
          if stop_at_eos:
              if categorical:
                  try:
                      is_eos = (
                          np.argmax(vector[: len(CMDS_LIST) + 1]) == 0
                      )
                  except:
                      raise Exception(vector)
              else:
                  is_eos = vector[0] < -0.5
  
              if is_eos:
                  break
          new_path.append(
              " ".join(vector_to_cmd(vector, categorical=categorical))
          )
      new_path = " ".join(new_path)
      return (
          SVG_PREFIX_BIG
          + PATH_PREFIX_1
          + new_path
          + PATH_POSFIX_1
          + SVG_POSFIX
      )
  
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 30 for calling a global function with example usage: vector_to_svg(vectors, stop_at_eos, categorical) and returns: unknown