<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _validate_edges_do_not_have_extra_links(class_name, properties):
 """Validate that edges do not have properties of Link type that aren't the edge endpoints."""

    for property_name, property_descriptor in six.iteritems(properties):
        if property_name in {EDGE_SOURCE_PROPERTY_NAME, EDGE_DESTINATION_PROPERTY_NAME}:
            continue

        if property_descriptor.type_id == PROPERTY_TYPE_LINK_ID:
            raise IllegalSchemaStateError(u'Edge class "{}" has a property of type Link that is '
                                          u'not an edge endpoint, this is not allowed: '
                                          u'{}'.format(class_name, property_name))