human
Solve the following python programming problem given the following code:
def llvm37_to_34_ir(ir) : 
    '
    Convert LLVM 3.7 IR for LLVM 3.4.
    ' 
    def parse_out_leading_type(s) : 
        par_level = 0 
        pos = 0 
        while True : 
            m = re_type_tok.search (s, pos) 
            if (m is None) : 
                raise RuntimeError (('failed parsing leading type: %s' % (s,))) 
                break 
pos = m.end () 
            tok = m.group (0) 
            if (tok == ',') : 
                if (par_level == 0) : 
                    break 
else : 
                if (tok in '{[(') : 
                    par_level += 1 
else : 
                    if (tok in ')]}') : 
                        par_level -= 1 
return s [pos :].lstrip () 
buf = [] 
    for line in ir.splitlines () : 
        orig = line 
        if re_metadata_def.match (line) : 
            if (None is re_metadata_correct_usage.search (line)) : 
                line = line.replace ('!{', 'metadata !{') 
                line = line.replace ('!"', 'metadata !"') 
if ('getelementptr ' in line) : 
            m = re_getelementptr.search (line) 
            if (m is None) : 
                raise RuntimeError (('failed parsing getelementptr: %s' % (line,))) 
pos = m.end () 
            line = (line [: pos] + parse_out_leading_type (line [buf :])) 
if ('load ' in line) : 
            m = re_load.search (line) 
            if (m is None) : 
                raise RuntimeError (('failed parsing load: %s' % (line,))) 
pos = m.end () 
            line = (line [: pos] + parse_out_leading_type (line [pos :])) 
if ('call ' in line) : 
            line = re_call.sub ('\\1*\\2', line) 
line = re_annotations.sub ('', line) 
        buf.append (line) 
return '
'.join (buf) 

    
    

    Fix the buggy line: line = (line [: pos] + parse_out_leading_type (line [buf :]))
assistant
#Here is Python code to fix the buggy line: line = (line [: pos] + parse_out_leading_type (line [buf :]))
.

line = (line [: pos] + parse_out_leading_type (line [pos :]))