human
Solve the following python programming problem given the following code:
def main(argv) : 
    api_files = rst_files = [rst for rst in os.listdir ('doc/api') if (fnmatch.fnmatch (rst, '*.rst') and (rst not in excluded_docs))] 
    cmd = argv.pop (0) 
    def has(* options) : 
        for opt in options : 
            if (opt in argv) : 
                return argv.pop (argv.index (opt)) 
if has ('-h', '--help') : 
        usage (cmd) 
verbose = has ('-v', '--verbose') 
    only_documented = (not has ('-a', '--all')) 
    if argv : 
        given_files = [] 
        for arg in argv : 
            arg = arg.replace ('\\', '/').replace ((api_doc + '/'), '') 
            arg = (arg.replace ('.rst', '') + '.rst') 
            if ('*' in arg) : 
                given_files += [rst for rst in only_documented if fnmatch.fnmatch (rst, arg)] 
else : 
                if (arg in api_files) : 
                    given_files.append (arg) 
api_files = given_files 
rst_basenames = sorted ((f [: (- 4)] for f in rst_files)) 
    for rst in api_files : 
        basename = rst.replace ('.rst', '') 
        if (verbose or (len (api_files) > 1)) : 
            print (('== Checking %s ... ' % rst)) 
check_api_doc (basename, verbose, only_documented, any (((f.startswith (basename) and (f != basename)) for f in rst_basenames))) 

    
    

    Fix the buggy line: given_files += [rst for rst in only_documented if fnmatch.fnmatch (rst, arg)]
assistant
#Here is Python code to fix the buggy line: given_files += [rst for rst in only_documented if fnmatch.

given_files += [rst for rst in api_files if fnmatch.fnmatch (rst, arg)]