def METHOD_NAME(
    action, first_op, second_op, seed, temp_dir
) -> DataFlow:
    """
    A function to create chained dataflows for archive extraction/creation.
    """
    second_op_output_typ = "directory" if action == "extract" else "file"
    dataflow = DataFlow(
        operations={first_op.op.name: first_op, second_op.op.name: second_op,},
        seed={
            Input(
                value=seed["input_path"],
                definition=get_key_substr("input", first_op.op.inputs),
            ),
            Input(
                value=temp_dir / f"{str(uuid.uuid4())}.tar",
                definition=get_key_substr("output", first_op.op.inputs),
            ),
            Input(
                value=seed["output_path"],
                definition=get_key_substr("output", second_op.op.inputs),
                origin="seed.final_output",
            ),
        },
    )
    dataflow.flow.update(
        {
            second_op.op.name: InputFlow(
                inputs={
                    "input_file_path": [{first_op.op.name: "output_path"}],
                    f"output_{second_op_output_typ}_path": [
                        "seed.final_output"
                    ],
                }
            )
        }
    )
    dataflow.update()
    return dataflow