<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def paths_for_shell(paths, separator=' '):
 """ Converts a list of paths for use in shell commands """

    paths = filter(None, paths)
    paths = map(shlex.quote, paths)
    if separator is None:
        return paths
    return separator.join(paths)