code: def extract_file(output_directory, input_filename, use_xz):
      print("Extracting %s" % input_filename)
      if output_directory is None:
          output_directory, output_filename = os.path.split(
              input_filename
          )
      else:
          _, output_filename = os.path.split(input_filename)
  
      json_idx = output_filename.rfind(".jsonl")
      if json_idx < 0:
          output_filename = output_filename + ".txt"
      else:
          output_filename = output_filename[:json_idx] + ".txt"
      if use_xz:
          output_filename += ".xz"
          open_file = lambda x: lzma.open(x, "wt", encoding="utf-8")
      else:
          open_file = lambda x: open(x, "w", encoding="utf-8")
  
      output_filename = os.path.join(output_directory, output_filename)
      print("Writing content to %s" % output_filename)
      with open_read_text(input_filename) as fin:
          with open_file(output_filename) as fout:
              for line in fin:
                  content = json.loads(line)
                  content = content["content"]
  
                  fout.write(content)
                  fout.write("\n\n")
  
file_path: stanza/stanza/utils/charlm/oscar_to_text.py
imports: import argparse
  import glob
  import json
  import lzma
  import os
  import sys
  from stanza.models.common.utils import open_read_text
label_desc: Use image node_id 1 for calling a global function with example usage: extract_file(output_directory, input_filename, use_xz) without return types