code: def to_boolean(value):
      
      if value is not None:
          if str(value).lower() in TRUE_TOKENS:
              return True
  
          vfloat = to_number(float, value)
          if vfloat is not None:
              return bool(vfloat)
  
      return False
docs: Args:
          value (str | unicode | None): Value to convert to bool
  
      Returns:
          (bool): Deduced boolean value