@staticmethod<EOL><INDENT>def __write(path, data, mode="<STR_LIT:w>"):<DEDENT>
with open(path, mode) as data_file:<EOL><INDENT>data = json.dumps(data, indent=<NUM_LIT:4>)<EOL>data_file.write(data)<EOL>return data<EOL><DEDENT>
Writes to a File. Returns the data written.
path - (string) path to the file to write to.
data - (json) data from a request.
mode - (string) mode to open the file in. Default to 'w'. Overwrites.