<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_arc_indexes(geometry, merged_arcs, old_arcs):
 """ Updated geometry arc indexes, and add arcs to merged_arcs along the way. Arguments are modified in-place, and nothing is returned. """

    if geometry['type'] in ('Point', 'MultiPoint'):
        return

    elif geometry['type'] == 'LineString':
        for arc_index, old_arc in enumerate(geometry['arcs']):
            geometry['arcs'][arc_index] = len(merged_arcs)
            merged_arcs.append(old_arcs[old_arc])

    elif geometry['type'] == 'Polygon':
        for ring in geometry['arcs']:
            for arc_index, old_arc in enumerate(ring):
                ring[arc_index] = len(merged_arcs)
                merged_arcs.append(old_arcs[old_arc])

    elif geometry['type'] == 'MultiLineString':
        for part in geometry['arcs']:
            for arc_index, old_arc in enumerate(part):
                part[arc_index] = len(merged_arcs)
                merged_arcs.append(old_arcs[old_arc])

    elif geometry['type'] == 'MultiPolygon':
        for part in geometry['arcs']:
            for ring in part:
                for arc_index, old_arc in enumerate(ring):
                    ring[arc_index] = len(merged_arcs)
                    merged_arcs.append(old_arcs[old_arc])

    else:
        raise NotImplementedError("Can't do %s geometries" % geometry['type'])