code: def atsc(IL, IR, j):
      """
      Compute the anchored time series chain (ATSC)
  
      Note that since the matrix profile indices, `IL` and `IR`, are pre-computed,
      this function is agnostic to subsequence normalization.
  
      Parameters
      ----------
      IL : numpy.ndarray
          Left matrix profile indices
  
      IR : numpy.ndarray
          Right matrix profile indices
  
      j : int
          The index value for which to compute the ATSC
  
      Returns
      -------
      out : numpy.ndarray
          Anchored time series chain for index, `j`
  
      See Also
      --------
      stumpy.allc : Compute the all-chain set (ALLC)
  
      Notes
      -----
      `DOI: 10.1109/ICDM.2017.79 <https://www.cs.ucr.edu/~eamonn/chains_ICDM.pdf>`__
  
      See Table I
  
      This is the implementation for the anchored time series chains (ATSC).
  
      Unlike the original paper, we've replaced the while-loop with a more stable
      for-loop.
  
      Examples
      --------
      >>> import stumpy
      >>> import numpy as np
      >>> mp = stumpy.stump(np.array([584., -11., 23., 79., 1001., 0., -19.]), m=3)
      >>> stumpy.atsc(mp[:, 2], mp[:, 3], 1)
      array([1, 3])
      """
      C = deque([j])
      for i in range(IL.size):
          if IR[j] == -1 or IL[IR[j]] != j:
              break
          else:
              j = IR[j]
              C.append(j)
  
      out = np.array(list(C), dtype=np.int64)
  
      return out
  
imports: from collections import deque
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: atsc(IL, IR, j) and returns: out