<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cmd2args(cmd):
 """Prepare a command line for execution by Popen. """

    if isinstance(cmd, str):
        return cmd if win32 else shlex.split(cmd)
    return cmd