def convert(value): if value is None: raise TypeError("None is not allowed.") else: valueForConversion = value if isinstance(value, JavaObject): valueForConversion = list(value) return TypeConverters.toListString(valueForConversion)
def convert(value): package = getattr(_jvm().ai.h2o.sparkling.ml.params, "H2OAlgoParamsHelper$") return [e for e in package.__getattr__("MODULE$").getValidatedEnumValues(enumClass, TypeConverters.toListString(value), nullEnabled)]