<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_by_query(self, indices, doc_types, query, **query_params):
 """ Delete documents from one or more indices and one or more types based on a query. """

        path = self._make_path(indices, doc_types, '_query')
        body = {"query": query.serialize()}
        return self._send_request('DELETE', path, body, query_params)