code: def __init__(self, graphspec, test):
      self.graphspec = graphspec
      self.test = test
      self.should_resume = getattr(test, "RESUME", False)
      self.should_fail = getattr(test, "SHOULD_FAIL", False)
      self.flow_name = "%sFlow" % self.test.__class__.__name__
      self.used = set()
      self._code_cache = {}
      self.steps = self._index_steps(test)
      self.flow_code = self._pretty_print(self._flow_lines())
      self.check_code = self._pretty_print(self._check_lines())
      self.valid = True
  
      for step in self.steps:
          if step.required and step not in self.used:
              self.valid = False
  
file_path: metaflow/test/core/metaflow_test/formatter.py
imports: import sys
  import inspect
label_desc: Use image node_id 1 to create a new FlowFormatter object from inherited base classes: object with example: obj = FlowFormatter(graphspec, test)