code: def cast_path(obj):
      """
      Take a bytes or str path and cast it to unicode.
  
      Apparently it is perfectly fine to pass both byte and unicode objects into
      the sys.path. This probably means that byte paths are normal at other
      places as well.
  
      Since this just really complicates everything and Python 2.7 will be EOL
      soon anyway, just go with always strings.
      """
      return u(obj, errors="replace")
  
imports: import errno
  import sys
  import os
  import re
  import pkgutil
  import warnings
  import inspect
  import subprocess
  import ast
label_desc: Use image node_id 7 for calling a global function with example usage: cast_path(obj) and returns: u