code: def _find_cycle(vertices, edges):
      r"""
      https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
      https://github.com/tdozat/Parser/blob/0739216129cd39d69997d28cbc4133b360ea3934/lib/etc/tarjan.py
      """
      _index = 0
      _stack = []
      _indices = {}
      _lowlinks = {}
      _onstack = defaultdict(lambda: False)
      _SCCs = []
  
      def _strongconnect(v):
          nonlocal _index
          _indices[v] = _index
          _lowlinks[v] = _index
          _index += 1
          _stack.append(v)
          _onstack[v] = True
  
          for w in edges[v]:
              if w not in _indices:
                  _strongconnect(w)
                  _lowlinks[v] = min(_lowlinks[v], _lowlinks[w])
              elif _onstack[w]:
                  _lowlinks[v] = min(_lowlinks[v], _indices[w])
  
          if _lowlinks[v] == _indices[v]:
              SCC = set()
              while True:
                  w = _stack.pop()
                  _onstack[w] = False
                  SCC.add(w)
                  if not (w != v):
                      break
              _SCCs.append(SCC)
  
      for v in vertices:
          if v not in _indices:
              _strongconnect(v)
  
      return [SCC for SCC in _SCCs if len(SCC) > 1]
  
imports: from collections import defaultdict
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from ...core.utils import seq_len_to_mask
  from ...embeddings.torch.utils import get_embeddings
  from ...modules.torch.dropout import TimestepDropout
  from ...modules.torch.encoder.transformer import TransformerEncoder
  from ...modules.torch.encoder.variational_rnn import VarLSTM
label_desc: Use image node_id 2 for calling a global function with example usage: _find_cycle(vertices, edges) and returns: unknown