<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tag_mode(self, tag_mode):
 """Sets the tag_mode of this ChartSettings. For the tabular view, which mode to use to determine which point tags to display # noqa: E501 :param tag_mode: The tag_mode of this ChartSettings. # noqa: E501 :type: str """

        allowed_values = ["all", "top", "custom"]  # noqa: E501
        if tag_mode not in allowed_values:
            raise ValueError(
                "Invalid value for `tag_mode` ({0}), must be one of {1}"  # noqa: E501
                .format(tag_mode, allowed_values)
            )

        self._tag_mode = tag_mode