code: def boolean(value):
      
      if isinstance(value, bool):
          return value
  
      if value == "":
          return False
  
      return strtobool(value)
docs: Configuration-friendly boolean type converter.
  
      Supports both boolean-valued and string-valued inputs (e.g. from env vars).