code: def _run_with_lock(cls, func, output_list: list):
      if len(output_list) == 0:
          return func()
  
      output = output_list.pop()
      wrapped_func = output.wrap_with_run_lock(func)
      return cls._run_with_lock(
          func=wrapped_func, output_list=output_list
      )
  
imports: from functools import partial
  import luigi
label_desc: Use image node_id 4 for calling the RunWithLock obj's underlying member method code with example usage: obj._run_with_lock(cls, func, output_list) and returns: cls, func