code: def shell_quote(s):
      'Quotes a string if it is not already quoted'
      return s if isinstance(s, ShellQuoted) \
          else ShellQuoted("'" + str(s).replace("'", "'\\''") + "'"f shell_quote(s):
      'Quotes a string if it is not already quoted'
      return s if isinstance(s, ShellQuoted) \
          else ShellQuoted("'" + str(s).replace("'", "'\\''") + "'")
docs: Quotes a string if it is not already quoted