<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def translate_sbml_compound(entry, new_id, compartment_map):
 """Translate SBML compound entry."""

    new_entry = DictCompoundEntry(entry, id=new_id)

    if 'compartment' in new_entry.properties:
        old_compartment = new_entry.properties['compartment']
        new_entry.properties['compartment'] = compartment_map.get(
            old_compartment, old_compartment)

    # Get XHTML notes properties
    for key, value in iteritems(parse_xhtml_species_notes(entry)):
        if key not in new_entry.properties:
            new_entry.properties[key] = value

    return new_entry