<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def ref_cov_per_contig(nucmer_hits):
        '''Input is hits made by self._parse_nucmer_coords_file.
           Returns dictionary. key = contig name. Value = number of bases that
           match to the reference sequence.'''
        coords = AssemblyCompare.nucmer_hits_to_ref_coords(nucmer_hits)
        return {x: pyfastaq.intervals.length_sum_from_list(coords[x]) for x in coords}