def METHOD_NAME(features):
    feature_name = 'numincidents'
    type_ = 'SEARCHSTAT'
    control = {
        'type': type_,
        'label': 'Stats',
        'description': 'Statistics data matching an incident search',
    }
    features.register_editor_plugin(
        'draftail', feature_name, draftail_features.EntityFeature(
            control,
            js=[get_files('statistics', extension='js')[0]['url']],
            css={'all': [get_files('statistics', extension='css')[0]['url']]}
        )
    )
    features.register_converter_rule('contentstate', feature_name, {
        'from_database_format': {'span[data-entity="num-incidents"]': SearchStatEntityElementHandler(type_)},
        'to_database_format': {'entity_decorators': {type_: num_incidents_entity_decorator}}
    })