@staticmethod
def _ordered_tag_specs(entity_tag_specs: Optional[List[EntityTagSpec]]) -> List[EntityTagSpec]:
    'Ensure that order of entity tag specs matches CRF layer order.'
    if (entity_tag_specs is None):
        return []
    crf_order = [ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_ROLE, ENTITY_ATTRIBUTE_GROUP]
    ordered_tag_spec = []
    for tag_name in crf_order:
        for tag_spec in entity_tag_specs:
            if (tag_name == tag_spec.tag_name):
                ordered_tag_spec.append(tag_spec)
    return ordered_tag_spec
Ensure that order of entity tag specs matches CRF layer order.
@staticmethod
def _ordered_tag_specs(entity_tag_specs: Optional[List[EntityTagSpec]]) -> List[EntityTagSpec]:
    
    if (entity_tag_specs is None):
        return []
    crf_order = [ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_ROLE, ENTITY_ATTRIBUTE_GROUP]
    ordered_tag_spec = []
    for tag_name in crf_order:
        for tag_spec in entity_tag_specs:
            if (tag_name == tag_spec.tag_name):
                ordered_tag_spec.append(tag_spec)
    return ordered_tag_spec