code: def list_to_file(filename, lines):
      """Write a list of strings to a text file.
  
      Args:
          filename (str): The output filename. It will be created/overwritten.
          lines (list(str)): Data to be written.
      """
      mkdir_or_exist(osp.dirname(filename))
      with open(filename, "w", encoding="utf-8") as fw:
          for line in lines:
              fw.write(f"{line}\n")
  
file_path: mmocr/mmocr/utils/fileio.py
imports: import hashlib
  import os.path
  import sys
  import warnings
  from glob import glob
  from typing import List
  from mmengine import mkdir_or_exist
label_desc: Use image node_id 1 for calling a global function with example usage: list_to_file(filename, lines) without return types