private static <T> Expression partialEvaluateContains(Set<T> set, T item, Expression self) {
    if (set.isEmpty()) {
      return self;
    } else if (set.size() == 1) {
      return constBool(set.contains(item));
    } else if (set.contains(item)) {
      return self;
    } else {
      return FALSE;
    }
  }
Evaluates to true if an input element has source layer matching {@code layer}.
planetiler-core/src/main/java/com/onthegomap/planetiler/expression/Expression.java