code: def _convert_to_str(s):
      if isinstance(s, bytes):
          return bytes.decode(s)
      else:
          return s
  
file_path: pysc2/pysc2/lib/replay/sc2_replay.py
imports: import io
  import json
  import types
  import mpyq
  from s2protocol import versions
  import tree
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_to_str(s) and returns: bytes, s