human
Solve the following python programming problem given the following code:
def _get_pkg_arch(metadata_dir) : 
    'Return the tuple architecture/variant for which the package has been
    built.

    :return: the tuple (architecture, variant)

    ' 
    def _parse_march(flags_file) : 
        value = None 
        with open (flags_file, 'r') as fcflags : 
            cflags = fcflags.read () 
match = _RE_ARCH_VARIANT.search (cflags) 
        if (match is not None) : 
            value = match.group (2) 
return value 
with open (os.path.join (metadata_dir, 'CHOST'), 'r') as fchost : 
        arch = fchost.readline ().strip ().split ('-', 1) [0] 
variant = None 
    for flag_file in ['CFLAGS', 'CXXFLAGS'] : 
        variant = _parse_march (os.path.join (fchost, flag_file)) 
        if (variant is not None) : 
            break 
return (arch, variant) 

    
    

    Fix the buggy line: variant = _parse_march (os.path.join (fchost, flag_file))
assistant
#Here is Python program to fix the buggy line: variant = _parse_march (os.

variant = _parse_march (os.path.join (metadata_dir, flag_file))