class_docstr: Factory methods for common type conversion functions for `Param.typeConverter`.
  
  .. versionadded:: 2.0.0
docstr: Convert a value to a boolean, if possible.
docstr_tok: ["Convert","a","value","to","a","boolean",",","if","possible","."]
code: def toBoolean(value: Any) -> bool:
      """
      Convert a value to a boolean, if possible.
      """
      if type(value) == bool:
          return value
      else:
          raise TypeError(
              "Boolean Param requires value of type bool. Found %s."
              % type(value)
          )
  
imports: import array
  from abc import ABCMeta
  import copy
  from typing import Any, Callable, Generic, List, Optional, overload, TypeVar, Union, TYPE_CHECKING
  import numpy
  from py4j.java_gateway import JavaObject
  from pyspark.ml.linalg import DenseVector, Vector, Matrix
  from pyspark.ml.util import Identifiable
label_desc: Use image node_id 16 for calling the TypeConverters obj's underlying member method code with example usage: obj.toBoolean(value) and returns: value