code: def test_op_raises_error_when_one_of_the_pipelines_is_broken(
      self,
  ) -> None:
      # Force a non-recoverable error.
      pipeline1 = read_text(pathname=" &^#").and_return()
      pipeline2 = read_text(pathname=" &^#").and_return()
  
      # Break the first pipeline.
      try:
          next(iter(pipeline1))
      except Exception:
          assert pipeline1.is_broken
  
      with pytest.raises(
          ValueError,
          match=r"^At least one of the specified data pipelines is broken and cannot be sampled\.$",
      ):
          DataPipeline.sample([pipeline1, pipeline2]).and_return()
  
file_path: fairseq2/tests/unit/data/data_pipeline/test_sample.py
imports: import math
  import pytest
  import torch
  from fairseq2.data import DataPipeline, DataPipelineError, read_sequence
  from fairseq2.data.text import read_text
  from fairseq2.typing import CPU
  from tests.common import tmp_rng_seed
label_desc: Use image node_id 9 for calling the TestSampleOp obj's underlying member method code with example usage: obj.test_op_raises_error_when_one_of_the_pipelines_is_broken() without return types