from metaflow import FlowSpec, step, Runner

class ParentFlow(FlowSpec):
    @step
    def start(self):
        self.next(self.run_child_flows)

    @step
    def run_child_flows(self):
        child_runner = Runner("./child_flow.py").run()
        run_obj = child_runner.run
        self.child_result = run_obj.data.result
        self.next(self.end)

    @step
    def end(self):
        print(
            f"Results:\nChildFlow: {self.child_result}"
        )

if __name__ == "__main__":
    ParentFlow()
