code: def cyclic_equals(seq1, seq2):
      """Decide whether two sequences are equal up to cyclic permutations.
  
      For example::
  
          >>> cyclic_equals("xyz", "zxy")
          True
          >>> cyclic_equals("xyz", "zyx")
          False
  
      """
      # Cast seq2 to a tuple since `cycles()` yields tuples.
      seq2 = tuple(seq2)
      return any(x == tuple(seq2) for x in cycles(seq1))
  
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 2 for calling a global function with example usage: cyclic_equals(seq1, seq2) and returns: any