<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _save_json(self, filename):
 """Save sensors to json file."""

        with open(filename, 'w') as file_handle:
            json.dump(self._sensors, file_handle, cls=MySensorsJSONEncoder,
                      indent=4)
            file_handle.flush()
            os.fsync(file_handle.fileno())