<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_summary(self, contents):
 """Parses summary file into a dictionary of counts."""


        lines = contents.strip().split('\n')

        data = {}
        for row in lines[1:]:
            split = row.strip().split('\t')

            sample = split[0]

            data[sample] = {
                'species_a': int(split[1]),
                'species_b': int(split[2]),
                'ambiguous': int(split[3])
            }

        return data