<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_jsonl_file(fname, data):
 """Writes a jsonl file. Args: data: list of json encoded data """

    if not isinstance(data, list):
        print('warning: malformed json data for file', fname)
        return
    with open(fname, 'w') as of:
        for row in data:
            # TODO: other malformed cases?
            if row.strip():
                of.write('%s\n' % row.strip())