def combine_paths(*args, **kws):
r = []<EOL>for a in args:<EOL><INDENT>if not a:<EOL><INDENT>continue<EOL><DEDENT>if is_string(a):<EOL><INDENT>a = [a]<EOL><DEDENT>r.append(a)<EOL><DEDENT>args = r<EOL>if not args:<EOL><INDENT>return []<EOL><DEDENT>if len(args) == <NUM_LIT:1>:<EOL><INDENT>result = reduce(lambda a, b: a + b, map(glob, args[<NUM_LIT:0>]), [])<EOL><DEDENT>elif len(args) == <NUM_LIT:2>:<EOL><INDENT>result = []<EOL>for a0 in args[<NUM_LIT:0>]:<EOL><INDENT>for a1 in args[<NUM_LIT:1>]:<EOL><INDENT>result.extend(glob(os.path.join(a0, a1)))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>result = combine_paths(*(combine_paths(args[<NUM_LIT:0>], args[<NUM_LIT:1>]) + args[<NUM_LIT:2>:]))<EOL><DEDENT>verbosity = kws.get('<STR_LIT>', <NUM_LIT:1>)<EOL>log.debug('<STR_LIT>', '<STR_LIT:U+002C>'.join(result))<EOL>return result<EOL>
Return a list of existing paths composed by all combinations of
        items from arguments.