code: def print_bytes(
      s, header_text=None, end=b"\n", file=sys.stdout, flush=True
  ):
      if header_text:
          file.write(
              header_text
          )  # note: text! => file.write() instead of out.write()
      file.flush()
      try:
          out = file.buffer  # Py3
      except AttributeError:
          out = file  # Py2
      out.write(s)
      if end:
          out.write(end)
      if flush:
          out.flush()
  
imports: from __future__ import absolute_import
  import os
  import sys
  import re
  import io
  import codecs
  import shutil
  import tempfile
  from contextlib import contextmanager
label_desc: Use image node_id 23 for calling a global function with example usage: print_bytes(s, header_text, end, file, flush) without return types