<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_descriptor_from_property_definition(self, class_name, property_definition, class_name_to_definition):
 """Return a PropertyDescriptor corresponding to the given OrientDB property definition."""

        name = property_definition['name']
        type_id = property_definition['type']
        linked_class = property_definition.get('linkedClass', None)
        linked_type = property_definition.get('linkedType', None)
        qualifier = None

        validate_supported_property_type_id(name, type_id)

        if type_id == PROPERTY_TYPE_LINK_ID:
            if class_name not in self._edge_class_names:
                raise AssertionError(u'Found a property of type Link on a non-edge class: '
                                     u'{} {}'.format(name, class_name))

            if name not in {EDGE_SOURCE_PROPERTY_NAME, EDGE_DESTINATION_PROPERTY_NAME}:
                raise AssertionError(u'Found a property of type Link with an unexpected name: '
                                     u'{} {}'.format(name, class_name))

            if linked_class is None:
                raise AssertionError(u'Property "{}" is declared with type Link but has no '
                                     u'linked class: {}'.format(name, property_definition))

            if linked_class not in self._vertex_class_names:
                is_linked_class_abstract = class_name_to_definition[linked_class]['abstract']
                all_subclasses_are_vertices = True
                for subclass in self._subclass_sets[linked_class]:
                    if subclass != linked_class and subclass not in self.vertex_class_names:
                        all_subclasses_are_vertices = False
                        break
                if not (is_linked_class_abstract and all_subclasses_are_vertices):
                    raise AssertionError(u'Property "{}" is declared as a Link to class {}, but '
                                         u'that class is neither a vertex nor is it an '
                                         u'abstract class whose subclasses are all vertices!'
                                         .format(name, linked_class))

            qualifier = linked_class
        elif type_id in COLLECTION_PROPERTY_TYPES:
            if linked_class is not None and linked_type is not None:
                raise AssertionError(u'Property "{}" unexpectedly has both a linked class and '
                                     u'a linked type: {}'.format(name, property_definition))
            elif linked_type is not None and linked_class is None:
                # No linked class, must be a linked native OrientDB type.
                validate_supported_property_type_id(name + ' inner type', linked_type)

                qualifier = linked_type
            elif linked_class is not None and linked_type is None:
                # No linked type, must be a linked non-graph user-defined type.
                if linked_class not in self._non_graph_class_names:
                    raise AssertionError(u'Property "{}" is declared as the inner type of '
                                         u'an embedded collection, but is not a non-graph class: '
                                         u'{}'.format(name, linked_class))

                qualifier = linked_class
            else:
                raise AssertionError(u'Property "{}" is an embedded collection but has '
                                     u'neither a linked class nor a linked type: '
                                     u'{}'.format(name, property_definition))

        default_value = None
        default_value_string = property_definition.get('defaultValue', None)
        if default_value_string is not None:
            default_value = parse_default_property_value(name, type_id, default_value_string)

        descriptor = PropertyDescriptor(type_id=type_id, qualifier=qualifier, default=default_value)
        # Sanity-check the descriptor before returning it.
        _validate_collections_have_default_values(class_name, name, descriptor)
        return descriptor