'Load a descriptor definition from the specified xml_object.
Subclasses should not need to override this except in special
cases (e.g. html module)
Args:
xml_object: an lxml.etree._Element containing the definition to load
system: the modulestore system (aka, runtime) which accesses data and provides access to services
def_id: the definition id for the block--used to compute the usage id and asides ids
id_generator: used to generate the usage_id'

@classmethod
def load_definition(cls, xml_object, system, def_id, id_generator):

    filename = xml_object.get('filename')
    if (filename is None):
        definition_xml = copy.deepcopy(xml_object)
        filepath = ''
        aside_children = []
    else:
        dog_stats_api.increment(DEPRECATION_VSCOMPAT_EVENT, tags=['location:xmlparser_util_mixin_load_definition_filename'])
        filepath = cls._format_filepath(xml_object.tag, filename)
        if ((not system.resources_fs.exists(filepath)) and hasattr(cls, 'backcompat_paths')):
            dog_stats_api.increment(DEPRECATION_VSCOMPAT_EVENT, tags=['location:xmlparser_util_mixin_load_definition_backcompat'])
            candidates = cls.backcompat_paths(filepath)
            for candidate in candidates:
                if system.resources_fs.exists(candidate):
                    filepath = candidate
                    break
        definition_xml = cls.load_file(filepath, system.resources_fs, def_id)
        usage_id = id_generator.create_usage(def_id)
        aside_children = system.parse_asides(definition_xml, def_id, usage_id, id_generator)
        definition_xml.attrib.update(xml_object.attrib)
    definition_metadata = cls._get_metadata_from_xml(definition_xml)
    cls.clean_metadata_from_xml(definition_xml)
    (definition, children) = cls.definition_from_xml(definition_xml, system)
    if definition_metadata:
        definition['definition_metadata'] = definition_metadata
    definition['filename'] = [filepath, filename]
    if aside_children:
        definition['aside_children'] = aside_children
    return (definition, children)
