def generate_event(self, service_name, event_type, values_to_sub):
<EOL>tags = self.event_mapping[service_name][event_type]['<STR_LIT>']<EOL>values_to_sub = self.encode(tags, '<STR_LIT>', values_to_sub)<EOL>this_folder = os.path.dirname(os.path.abspath(__file__))<EOL>file_name = self.event_mapping[service_name][event_type]['<STR_LIT:filename>'] + "<STR_LIT>"<EOL>file_path = os.path.join(this_folder, "<STR_LIT>", service_name, file_name)<EOL>with open(file_path) as f:<EOL><INDENT>data = json.load(f)<EOL><DEDENT>data = json.dumps(data, indent=<NUM_LIT:2>)<EOL>return renderer.render(data, values_to_sub)<EOL>
opens the event json, substitutes the values in, and
returns the customized event json

Parameters
----------
service_name: string
    name of the top level service (S3, apigateway, etc)
event_type: string
    name of the event underneath the service
values_to_sub: dict
    key/value pairs to substitute into the json
Returns
-------
renderer.render(): string
    string version of the custom event json