class_docstr: Resuming and initial running of a flow should write run id file early (prior to execution)
class_docstr_tok: ["Resuming","and","initial","running","of","a","flow","should","write","run","id","file","early","(","prior","to","execution",")"]
code: def step_start(self):
      import os
      from metaflow import current
  
      # Whether we are in "run" or "resume" mode, --run-id-file must be written prior to execution
      assert os.path.isfile(
          "run-id"
      ), "run id file should exist before resume execution"
      with open("run-id", "r") as f:
          run_id_from_file = f.read()
      assert run_id_from_file == current.run_id
  
      # Test both regular run and resume paths
      if not is_resumed():
          raise ResumeFromHere()
  
imports: from metaflow_test import MetaflowTest, ExpectationFailed, steps
label_desc: Use image node_id 1 for calling the RunIdFileTest obj's underlying member method code with example usage: obj.step_start() without return types