def METHOD_NAME(s):  # type: (text_type) -> text_type
    """Quotes a value for the raw Win32 process command line.
    Quotes a value to be safely used by anything that calls the Win32
    CreateProcess API.
    Args:
        s: The string to quote.
    Returns:
        (text_type): The quoted string value.
    """
    # https://docs.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way
    if not s:
        return u'""'
    if not _UNSAFE_C.search(s):
        return s
    # Replace any double quotes in an argument with '\"'.
    s = s.replace('"', '\\"')
    # We need to double up on any '\' chars that preceded a double quote (now '\"').
    s = re.sub(r'(\\+)\\"', r'\1\1\"', s)
    # Double up '\' at the end of the argument so it doesn't escape out end quote.
    s = re.sub(r'(\\+)$', r'\1\1', s)
    # Finally wrap the entire argument in double quotes now we've escaped the double quotes within.
    return u'"{0}"'.format(s)