class_docstr: Unit tests for the chain decomposition function.
code: def assertContainsChain(self, chain, expected):
      # A cycle could be expressed in two different orientations, one
      # forward and one backward, so we need to check for cyclic
      # equality in both orientations.
      reversed_chain = list(
          reversed([tuple(reversed(e)) for e in chain])
      )
      for candidate in expected:
          if cyclic_equals(chain, candidate):
              break
          if cyclic_equals(reversed_chain, candidate):
              break
      else:
          self.fail("chain not found")
  
file_path: networkx/networkx/algorithms/tests/test_chains.py
imports: from itertools import cycle, islice
  import pytest
  import networkx
label_desc: Use image node_id 1 for calling the TestChainDecomposition obj's underlying member method code with example usage: obj.assertContainsChain(chain, expected) without return types