def METHOD_NAME(features):
    colormap = ['red', 'yellow', 'green']
    encoding = NominalColorEncoding(
        feature='class',
        colormap=colormap,
    )
    values = encoding(features)
    assert_colors_equal(values, ['red', 'yellow', 'green'])