code: def to_str(value: Any) -> Optional[str]:
      """
      A wrapper over str(), but converts bool values to lower case strings.
      If None is given, just returns None, instead of converting it to string "None".
      """
      if isinstance(value, bool):
          return str(value).lower()
      elif value is None:
          return value
      else:
          return str(value)
  
imports: import inspect
  import functools
  import os
  from typing import Any, Callable, Optional, Sequence, TYPE_CHECKING, cast, TypeVar, Union, Type
  from py4j.java_collections import JavaArray
  from py4j.java_gateway import JavaClass, JavaGateway, JavaObject
  from pyspark import SparkContext
  from pyspark.errors import AnalysisException, ParseException, IllegalArgumentException, StreamingQueryException, QueryExecutionException, PythonException, UnknownException, SparkUpgradeException, PySparkNotImplementedError, PySparkRuntimeError
  from pyspark.errors.exceptions.captured import CapturedException
  from pyspark.find_spark_home import _find_spark_home
label_desc: Use image node_id 3 for calling a global function with example usage: to_str(value) and returns: str, value, str