<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def matching_method(self, matching_method):
 """Sets the matching_method of this SearchQuery. The method by which search matching is performed. Default: CONTAINS # noqa: E501 :param matching_method: The matching_method of this SearchQuery. # noqa: E501 :type: str """

        allowed_values = ["CONTAINS", "STARTSWITH", "EXACT", "TAGPATH"]  # noqa: E501
        if matching_method not in allowed_values:
            raise ValueError(
                "Invalid value for `matching_method` ({0}), must be one of {1}"  # noqa: E501
                .format(matching_method, allowed_values)
            )

        self._matching_method = matching_method