code: def get_cgi_parameter_bool_or_default(form: cgi.FieldStorage,
                                        key: str,
                                        default: bool = None) -> Optional[bool]:
      
      s = get_cgi_parameter_str(form, key)
      if s is None or len(s) == 0:
          return default
      return is_1(s)
docs: Extracts a boolean parameter from a CGI form (``"1"`` = ``True``,
      other string = ``False``, absent/zero-length string = default value).