Validates x (column), raising error if invalid.

def _validate_x(self, x, z):
        """Validates x (column), raising error if invalid."""

        if (x < 0) or (x > ((2**z) - 1)):
            raise InvalidColumnError(
                "{} is not a valid value for x (column)".format(x)
            )

        return x