code: def _validate_y(self, y, z):
          
  
          if (y < 0) or (y > ((2**z) - 1)):
              raise InvalidRowError(
                  "{} is not a valid value for y (row)".format(y)
              )
  
          return y
docs: Validates y (row), raising error if invalid.