code: def _update_loop(self):
      def _file_size(path):
          if os.path.exists(path):
              return os.path.getsize(path)
          else:
              return 0
  
      # these env vars are set by mflog.mflog_env
      FILES = [os.environ["MFLOG_STDOUT"], os.environ["MFLOG_STDERR"]]
      start_time = time.time()
      sizes = [0 for _ in FILES]
      while self.is_alive:
          new_sizes = list(map(_file_size, FILES))
          if new_sizes != sizes:
              sizes = new_sizes
              try:
                  subprocess.call(BASH_SAVE_LOGS_ARGS)
              except:
                  pass
          time.sleep(update_delay(time.time() - start_time))
  
file_path: metaflow/metaflow/mflog/save_logs_periodically.py
imports: import os
  import sys
  import time
  import subprocess
  from threading import Thread
  from metaflow.sidecar import MessageTypes
  from .None import update_delay, BASH_SAVE_LOGS_ARGS
label_desc: Use image node_id 4 for calling the SaveLogsPeriodicallySidecar obj's underlying member method code with example usage: obj._update_loop() and returns: os, int