def ValidatePaymentMethod(self, problems):
    if self.payment_method == "" or self.payment_method == None:
      problems.MissingValue("payment_method")
    elif (not isinstance(self.payment_method, int) or
          self.payment_method not in range(0, 2)):
      problems.InvalidValue("payment_method", self.payment_method)
dataset/ETHPy150Open google/transitfeed/transitfeed/fareattribute.py/FareAttribute.ValidatePaymentMethod/original