class_docstr: This is for gathering several estimations into one function, which
  will return the sequence of outputs.
  Also this "function" is stateful, hence it can be stopped, and recovered,
  which is useful when job can be preempted.
  
  Usage
  -----
  func = FunctionSequence()
  func.add(my_function1, arg1, kwarg1=value_kwarg1)
  func.add(my_function2, arg1, arg2)
  result1, result2 = func()
  
  Note
  ----
  This function is checkpointable because:
  - it derives from Checkpointable
  - it keeps DelayedSubmission objects as attribute, which in turn store the
    results of the computation in memory once they are computed. So at checkpoint
    time, those results will be saved, and only the non-computed results
    will be computed once the job restarts.
code: def __iter__(self) -> tp.Iterator[DelayedSubmission]:
      return iter(self.delayed_functions)
  
imports: import collections
  import contextlib
  import datetime
  import itertools
  import os
  import random
  import shutil
  import subprocess
  import tempfile
  import time
  import typing
  from pathlib import Path
  from .core import core
  from .core.job_environment import JobEnvironment
  from .core.utils import CommandFunction
  from .core.utils import DelayedSubmission
  from .core.utils import environment_variables
label_desc: Use image node_id 4 for calling the FunctionSequence obj's underlying member method code with example usage: obj.__iter__() and returns: iter