code: def decorate(source, line, version=VERSION, now=None, lineid=None):
      if now is None:
          now = datetime.utcnow()
      tstamp = to_bytes(now.strftime(ISOFORMAT))
      if not lineid:
          lineid = to_bytes(str(uuid.uuid4()))
      line = to_bytes(line)
      source = to_bytes(source)
      return b"".join(
          (
              b"[MFLOG|",
              version,
              b"|",
              tstamp,
              b"Z|",
              source,
              b"|",
              lineid,
              b"]",
              line,
          )
      )
  
file_path: metaflow/metaflow/mflog/mflog.py
imports: import heapq
  import re
  import time
  import uuid
  from datetime import datetime
  from collections import namedtuple
  from metaflow.util import to_bytes, to_fileobj, to_unicode
label_desc: Use image node_id 1 for calling a global function with example usage: decorate(source, line, version, now, lineid) and returns: bytes