code: def write_jsonl(
      filename: str,
      data: Iterable[Dict],
      append: bool = False,
      drop_builtin: bool = True,
  ):
      """
      Writes an iterable of dictionaries to jsonl
      """
      if append:
          mode = "ab"
      else:
          mode = "wb"
      filename = os.path.expanduser(filename)
      if filename.endswith(".gz"):
          with open(filename, mode) as fp:
              with gzip.GzipFile(fileobj=fp, mode="wb") as gzfp:
                  for x in data:
                      if drop_builtin:
                          x = {
                              k: v
                              for k, v in x.items()
                              if not k.startswith("_")
                          }
                      gzfp.write((json.dumps(x) + "\n").encode("utf-8"))
      else:
          with open(filename, mode) as fp:
              for x in data:
                  if drop_builtin:
                      x = {
                          k: v
                          for k, v in x.items()
                          if not k.startswith("_")
                      }
                  fp.write((json.dumps(x) + "\n").encode("utf-8"))
  
file_path: evalplus/evalplus/data/utils.py
imports: import gzip
  import json
  import os
  from os import PathLike
  from typing import Dict, Iterable
  import tempdir
  import wget
  from appdirs import user_cache_dir
label_desc: Use image node_id 3 for calling a global function with example usage: write_jsonl(filename, data, append, drop_builtin) without return types