human
Complete the below
def get_test_files(cfg):

    ''''Returns a list of test module filenames.'
    '''

What is a the Python program you requested?
assistant
#Here is the Python program you requested.
    matcher = compile_matcher(cfg.pathname_regex)
    results = []
    test_names = []
    if cfg.unit_tests:
        test_names.append('tests')
    if cfg.functional_tests:
        test_names.append('ftests')
    baselen = (len(cfg.basedir) + 1)
    def visit(ignored, dir, files):
        if (os.path.basename(dir) not in test_names):
            for name in test_names:
                if ((name + '.py') in files):
                    path = os.path.join(dir, (name + '.py'))
                    if matcher(path[baselen:]):
                        results.append(path)
            return
        if ('__init__.py' not in files):
            stderr(('%s    is    not    a    package' % dir))
            return
        for file in files:
            if (file.startswith('test') and file.endswith('.py')):
                path = os.path.join(dir, file)
                if matcher(path[baselen:]):
                    results.append(path)
    if cfg.follow_symlinks:
        walker = walk_with_symlinks
    else:
        walker = os.path.walk
    walker(cfg.basedir, visit, None)
    results.sort()
    return results