code: def test_primes():
      """Test prime factorizations."""
  
      def _product(ps):
          p = 1
          for num in ps:
              p *= num
          return p
  
      with pytest.raises(ValueError):
          _prime_factors(0)
  
      for x in range(1, 30):
          primes = _prime_factors(x)
          assert _product(primes) == x
          for p in primes:
              assert _prime_factors(p) == [p]
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/tests/unit/runtime/pipe/test_topology.py
imports: import pytest
  import torch
  import deepspeed.comm
  from deepspeed.runtime.pipe.topology import PipelineParallelGrid
  from deepspeed.runtime.pipe.topology import ProcessTopology
  from deepspeed.runtime.pipe.topology import _prime_factors
  from unit.common import DistributedTest
label_desc: Use image node_id 7 for calling a global function with example usage: test_primes() and returns: p