def validate(self, value):
        super(BorderModeProperty, self).validate(value)

        if isinstance(value, tuple):
            if len(value) != 2:
                raise ValueError(
                    "Border mode property suppose to get a tuple that "
                    "contains two elements, got {} elements"
                    "".format(len(value))
                )

        is_invalid_string = (
            isinstance(value, six.string_types) and
            self.valid_string_choices not in value
        )
        if is_invalid_string:
            valid_choices = ', '.join(self.valid_string_choices)
            raise ValueError("`{}` is invalid string value. Available: {}"
                             "".format(value, valid_choices))
dataset/ETHPy150Open itdxer/neupy/neupy/layers/convolutions.py/BorderModeProperty.validate/swapped operands of `not in`