code: def write_data(samples, prefix):
      with open("data/%s.source" % prefix, "w") as source, open(
          "data/%s.source.factor" % prefix, "w"
      ) as source_factor, open(
          "data/%s.target" % prefix, "w"
      ) as target, open(
          "data/%s.target.factor" % prefix, "w"
      ) as target_factor:
          for s, sf, tf in samples:
              print(s, file=source)
              print(sf, file=source_factor)
              print(s, file=target)
              print(tf, file=target_factor)
  
label_desc: Use image node_id 2 for calling a global function with example usage: write_data(samples, prefix) without return types