code: def save_records(filename, inputs, results):
      """
      Append measure records to file.
  
      Parameters
      ----------
      filename : str
          File name to write log to.
      inputs: List[MeasureInputs]
          The MeasureInputs to be written.
      results: List[MeasureResults]
          The MeasureResults to be written.
      """
      dirname = os.path.dirname(os.path.abspath(filename))
      if not os.path.exists(dirname):
          os.makedirs(dirname)
      _ffi_api.SaveRecords(filename, inputs, results)
  
imports: import argparse
  import logging
  import os
  import itertools
  import numpy
  import tvm._ffi
  from tvm.runtime import Object
  from .measure import MeasureErrorNo, MeasureCallback
  from .utils import calc_workload_dis_factor, decode_workload_key
  from .None import _ffi_api
label_desc: Use image node_id 4 for calling a global function with example usage: save_records(filename, inputs, results) without return types