def METHOD_NAME(directory, pattern): 
    for x in System.IO.Directory.GetFiles(directory, pattern):
        yield x
    for x in System.IO.Directory.GetDirectories(directory):
        for y in METHOD_NAME(x, pattern):
            yield y