<s> from __future__ import unicode_literals <EOL> from moto . core . responses import BaseResponse <EOL> from moto . ec2 . models import validate_resource_ids <EOL> from moto . ec2 . utils import sequence_from_querystring , tags_from_query_string , filters_from_querystring <EOL> class TagResponse ( BaseResponse ) : <EOL> def create_tags ( self ) : <EOL> resource_ids = sequence_from_querystring ( '<STR_LIT>' , self . querystring ) <EOL> validate_resource_ids ( resource_ids ) <EOL> self . ec2_backend . do_resources_exist ( resource_ids ) <EOL> tags = tags_from_query_string ( self . querystring ) <EOL> self . ec2_backend . create_tags ( resource_ids , tags ) <EOL> return CREATE_RESPONSE <EOL> def delete_tags ( self ) : <EOL> resource_ids = sequence_from_querystring ( '<STR_LIT>' , self . querystring ) <EOL> validate_resource_ids ( resource_ids ) <EOL> tags = tags_from_query_string ( self . querystring ) <EOL> self . ec2_backend . delete_tags ( resource_ids , tags ) <EOL> return DELETE_RESPONSE <EOL> def describe_tags ( self ) : <EOL> filters = filters_from_querystring ( querystring_dict = self . querystring ) <EOL> tags = self . ec2_backend . describe_tags ( filters = filters ) <EOL> template = self . response_template ( DESCRIBE_RESPONSE ) <EOL> return template . render ( tags = tags ) <EOL> CREATE_RESPONSE = """<STR_LIT>""" <EOL> DELETE_RESPONSE = """<STR_LIT>""" <EOL> DESCRIBE_RESPONSE = """<STR_LIT>""" </s>
