@cast_to_list(<NUM_LIT:0>)<EOL>def get_supported_filepaths(filepaths, supported_extensions, max_depth=float('<STR_LIT>')):
supported_filepaths = []<EOL>for path in filepaths:<EOL><INDENT>if os.name == '<STR_LIT>' and CYGPATH_RE.match(path):<EOL><INDENT>path = convert_cygwin_path(path)<EOL><DEDENT>if os.path.isdir(path):<EOL><INDENT>for root, __, files in walk_depth(path, max_depth):<EOL><INDENT>for f in files:<EOL><INDENT>if f.lower().endswith(supported_extensions):<EOL><INDENT>supported_filepaths.append(os.path.join(root, f))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>elif os.path.isfile(path) and path.lower().endswith(supported_extensions):<EOL><INDENT>supported_filepaths.append(path)<EOL><DEDENT><DEDENT>return supported_filepaths<EOL>
Get filepaths with supported extensions from given filepaths.

    Parameters:
            filepaths (list or str): Filepath(s) to check.

            supported_extensions (tuple or str): Supported file extensions or a single file extension.

            max_depth (int): The depth in the directory tree to walk.
                    A depth of '0' limits the walk to the top directory.
                    Default: No limit.

    Returns:
            A list of supported filepaths.