<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def percolate(self, index, doc_types, query):
 """ Match a query with a document """

        if doc_types is None:
            raise RuntimeError('percolate() must be supplied with at least one doc_type')

        path = self._make_path(index, doc_types, '_percolate')
        body = self._encode_query(query)
        return self._send_request('GET', path, body)