def encode(self, tags, encoding, values_to_sub):
for tag in tags:<EOL><INDENT>if tags[tag].get(encoding) != "<STR_LIT:None>":<EOL><INDENT>if tags[tag].get(encoding) == "<STR_LIT:url>":<EOL><INDENT>values_to_sub[tag] = self.url_encode(values_to_sub[tag])<EOL><DEDENT>if tags[tag].get(encoding) == "<STR_LIT>":<EOL><INDENT>values_to_sub[tag] = self.base64_utf_encode(values_to_sub[tag])<EOL><DEDENT><DEDENT><DEDENT>return values_to_sub<EOL>
reads the encoding type from the event-mapping.json
and determines whether a value needs encoding

Parameters
----------
tags: dict
    the values of a particular event that can be substituted
    within the event json
encoding: string
    string that helps navigate to the encoding field of the json
values_to_sub: dict
    key/value pairs that will be substituted into the json
Returns
-------
values_to_sub: dict
    the encoded (if need be) values to substitute into the json.