code: def safejoin(list_of_str_or_unicode):
      ## can accept a list of str objects, or a list of unicodes.
      ## safely joins them, returning the same type.
      xx = list_of_str_or_unicode
      if not xx:
          return ""
      if isinstance(xx[0], str):
          return " ".join(xx)
  
      if isinstance(xx[0], bytes):
          return " ".join(xx)
  
      if sys.version_info[0] < 3:
          if isinstance(xx[0], unicode):
              return " ".join(xx)
  
      raise Exception("Bad input to safejoin:", list_of_str_or_unicode)
  
imports: from __future__ import print_function
  import os
  import re
  import sys
  from collections import Counter
label_desc: Use image node_id 7 for calling a global function with example usage: safejoin(list_of_str_or_unicode) and returns: str, str, str, str