def find_with_extension(in_dir, ext, depth=<NUM_LIT:3>, sort=True):
assert depth >= <NUM_LIT:1><EOL>ext = ext.strip(os.extsep)<EOL>match = list()<EOL>for n in range(<NUM_LIT:1>, depth+<NUM_LIT:1>):<EOL><INDENT>wildcard = os.path.sep.join(["<STR_LIT:*>"]*n)<EOL>search_path = os.path.join(in_dir, os.extsep.join([wildcard, ext]))<EOL>match += glob.glob(search_path)<EOL><DEDENT>if sort:<EOL><INDENT>match.sort()<EOL><DEDENT>return match<EOL>
Naive depth-search into a directory for files with a given extension.

    Parameters
    ----------
    in_dir : str
        Path to search.
    ext : str
        File extension to match.
    depth : int
        Depth of directories to search.
    sort : bool
        Sort the list alphabetically

    Returns
    -------
    matched : list
        Collection of matching file paths.

    Examples
    --------
    >>> jams.util.find_with_extension('Audio', 'wav')
    ['Audio/LizNelson_Rainfall/LizNelson_Rainfall_MIX.wav',
     'Audio/LizNelson_Rainfall/LizNelson_Rainfall_RAW/LizNelson_Rainfall_RAW_01_01.wav',
     'Audio/LizNelson_Rainfall/LizNelson_Rainfall_RAW/LizNelson_Rainfall_RAW_02_01.wav',
     ...
     'Audio/Phoenix_ScotchMorris/Phoenix_ScotchMorris_STEMS/Phoenix_ScotchMorris_STEM_02.wav',
     'Audio/Phoenix_ScotchMorris/Phoenix_ScotchMorris_STEMS/Phoenix_ScotchMorris_STEM_03.wav',
    'Audio/Phoenix_ScotchMorris/Phoenix_ScotchMorris_STEMS/Phoenix_ScotchMorris_STEM_04.wav']