<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def based_on(self, based_on):
 """Sets the based_on of this TaxRate. :param based_on: The based_on of this TaxRate. :type: str """

        allowed_values = ["shippingAddress", "billingAddress"]
        if based_on is not None and based_on not in allowed_values:
            raise ValueError(
                "Invalid value for `based_on` ({0}), must be one of {1}"
                .format(based_on, allowed_values)
            )

        self._based_on = based_on