@classmethod
def is_valid(cls, v: str) ->bool:
    """ Determine whether the string v is a valid instance of bool """
    return isinstance(v, bool) or cls.bool_true.match(str(v)
        ) or cls.bool_false.match(str(v))
