human
Solve the following python programming problem given the following code:
def ToYaml(self) : 
    artifact_dict = self.ToPrimitiveDict () 
    def ReduceDict(in_dict) : 
        return dict (((k, v) for (k, v) in in_dict.items () if v)) 
artifact_dict = ReduceDict (artifact_dict) 
    sources_dict = artifact_dict.get ('sources') 
    if sources_dict : 
        artifact_dict ['sources'] = [ReduceDict (sources_dict) for c in sources_dict] 
name = artifact_dict.pop ('name') 
    doc = artifact_dict.pop ('doc') 
    doc_str = yaml.safe_dump ({ 
        'doc' : doc, 
}, allow_unicode = True, width = 80) [1 : (- 2)] 
    yaml_str = yaml.safe_dump (artifact_dict, allow_unicode = True, width = 80) 
    return ('name: %s
%s
%s' % (name, doc_str, yaml_str)) 

    
    

    Fix the buggy line: artifact_dict ['sources'] = [ReduceDict (sources_dict) for c in sources_dict]
assistant
#Here is Python code to fix the buggy line: artifact_dict ['sources'] = [ReduceDict (sources_dict) for c in sources_dict]
.

artifact_dict ['sources'] = [ReduceDict (c) for c in sources_dict]