<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_kegg_entries(f, context=None):
 """Iterate over entries in KEGG file."""


    section_id = None
    entry_line = None
    properties = {}
    for lineno, line in enumerate(f):
        if line.strip() == '///':
            # End of entry
            mark = FileMark(context, entry_line, 0)
            yield KEGGEntry(properties, filemark=mark)
            properties = {}
            section_id = None
            entry_line = None
        else:
            if entry_line is None:
                entry_line = lineno

            # Look for beginning of section
            m = re.match(r'([A-Z_]+)\s+(.*)', line.rstrip())
            if m is not None:
                section_id = m.group(1).lower()
                properties[section_id] = [m.group(2)]
            elif section_id is not None:
                properties[section_id].append(line.strip())
            else:
                raise ParseError(
                    'Missing section identifier at line {}'.format(lineno))