code: def to_json_file(file, data, pretty):
      
      json_string = to_json(data, pretty)
      file_utils.write_to_file(file, json_string)
docs: Writes object instance in JSON formatted String to file
      
      :param file: File to write JSON string ot
      :param data: Object to convert to JSON 
      :param pretty: Use pretty formatting or not