def register_bool_class(cls_or_name, name=None, true=None, false=None, ignore=None, caseless=True, spaceless=True):
    if isstring(cls_or_name):
        name = cls_or_name
        Bool = normboolclass(name, true=true, false=false, ignore=ignore, caseless=caseless, spaceless=spaceless)
        if not isboolclass(cls_or_name):
            raise TypeError("No bool class: %s" % repr(cls_or_name))
        Bool = cls_or_name
        if not name:
            name = Bool.__name__
    BOOL_CLASSES[name] = Bool
    def convert_to_bool(self, value, *true_false, **options):
        if true_false:
            lists = NormalizedDict({'true': [], 'false': []})
            # choose the first list to fill with items
            #  based on given TRUE or FALSE specifier:
                t_or_f_list = lists[true_false[0]]
            except KeyError:
                raise ValueError("Expected TRUE or FALSE, not: %s"
                                 % repr(true_false[0]))
            for item in true_false[1:]:
                if item in lists: #==> is new TRUE or FALSE specifier
                    #==> switch to corresponding list
                    t_or_f_list = lists[item]
                    if t_or_f_list:
                        raise ValueError("Multiple %s lists specfied."
                                         % normalize(item).upper())
            for key, items in lists.items():
                if not items:
                    raise ValueError("No %s list specified." % key.upper())
            if RobotBool(options.get('normalized', True)):
                boolcls = normboolclass(**lists)
                boolcls = boolclass(**lists)
            boolcls = options.get('boolclass') or options.get('booltype')
            if not boolcls: # fallback to robot's default bool conversion
                return BUILTIN.convert_to_boolean(value)

            if isstring(boolcls):
                try: # is a registered bool class name?
                    boolcls = BOOL_CLASSES[boolcls]
                except KeyError:
                    if '.' not in boolcls:
                        raise ValueError(
                          "No such bool class registered: '%s'" % boolcls)
                    modname, clsname = boolcls.rsplit('.', 1)
                    try: # is an importable 'module.class' string?
                        boolcls = getattr(__import__(modname), clsname)
                    except (ImportError, AttributeError):
                        raise ValueError(
                          "Can't import bool class: '%s'" % boolcls)
            elif not isboolclass(boolcls):
                raise TypeError("No bool class: %s" % repr(boolcls))

        return boolcls(value)