code: def safe_shlex_split(text_or_binary):
    
    value = ensure_text(text_or_binary) if PY3 else ensure_binary(text_or_binary)
    return shlex.split(value)
docs: Split a string using shell-like syntax.
  
    Safe even on python versions whose shlex.split() method doesn't accept unicode.