def put_warmer(self, doc_types=None, indices=None, name=None, warmer=None, querystring_args=None):
if not querystring_args:<EOL><INDENT>querystring_args = {}<EOL><DEDENT>doc_types_str = '<STR_LIT>'<EOL>if doc_types:<EOL><INDENT>doc_types_str = '<STR_LIT:/>' + '<STR_LIT:U+002C>'.join(doc_types)<EOL><DEDENT>path = '<STR_LIT>'.format('<STR_LIT:U+002C>'.join(indices), doc_types_str, name)<EOL>if hasattr(warmer, '<STR_LIT>'):<EOL><INDENT>body = warmer.serialize()<EOL><DEDENT>else:<EOL><INDENT>body = warmer<EOL><DEDENT>return self._send_request(method='<STR_LIT>', path=path, body=body, params=querystring_args)<EOL>
Put new warmer into index (or type)

:param doc_types: list of document types
:param warmer: anything with ``serialize`` method or a dictionary
:param name: warmer name
:param querystring_args: additional arguments passed as GET params to ES