def unicode_test(seg_instance, seg_str):
            seg_gen_str = str(seg_instance)

            self.assertEqual(len(seg_gen_str), 240)
            self.assertEqual(len(seg_str), 240)
            self.assertEqual(seg_gen_str, seg_str)
def deserialize(self, value):
        value = decode(value)
        validators.validate_required(value, self._required)
        if not value:
            return None
        if value.lower() in self.true_values:
            return True
        elif value.lower() in self.false_values:
            return False
        raise ValueError(f"invalid value for boolean: {value!r}")