def encode_features(features: dict) ->str:
    """Encodes features from a dictionary/JSON to CONLLU format."""
    return '|'.join(map(lambda kv: f'{kv[0]}={kv[1]}', features.items())
        ) if features else '_'
