code: def _convertSequence(
      dictionaries, streams, sequenceId, output, unk, annotated
  ):
      tokensPerStream = [
          [t for t in s.strip(" ").split(" ") if t != ""]
          for s in streams
      ]
      maxLen = max(len(tokens) for tokens in tokensPerStream)
  
      # writing to the output file
      for sampleIndex in range(maxLen):
          output.write(str(sequenceId))
          for streamIndex in range(len(tokensPerStream)):
              if len(tokensPerStream[streamIndex]) <= sampleIndex:
                  output.write("\t")
                  continue
              token = tokensPerStream[streamIndex][sampleIndex]
              if (
                  unk is not None
                  and token not in dictionaries[streamIndex]
              ):  # try unk symbol if specified
                  token = unk
              if token not in dictionaries[streamIndex]:
                  raise Exception(
                      "Token '{0}' cannot be found in the dictionary for stream {1}".format(
                          token, streamIndex
                      )
                  )
              value = dictionaries[streamIndex][token]
              output.write(
                  "\t|S" + str(streamIndex) + " " + str(value) + ":1"
              )
              if annotated:
                  output.write(
                      " |# " + re.sub(r"(\|(?!#))|(\|$)", r"|#", token)
                  )
          output.write("\n")
  
file_path: CNTK/Scripts/txt2ctf.py
imports: import sys
  import argparse
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: _convertSequence(dictionaries, streams, sequenceId, output, unk, annotated) without return types