docs: def directed_tripartition_indices(N):
      """Return indices for directed tripartitions of a sequence.
  
      Args:
          N (int): The length of the sequence.
  
      Returns:
          list[tuple]: A list of tuples containing the indices for each
          partition.
  
      Example:
          >>> N = 1
          >>> directed_tripartition_indices(N)
          [((0,), (), ()), ((), (0,), ()), ((), (), (0,))]
      """
      result = []
      if N <= 0:
          return result
  
      base = [0, 1, 2]
      for key in product(base, repeat=N):
          part = [[], [], []]
          for i, location in enumerate(key):
              part[location].append(i)
  
          result.append(tuple(tuple(p) for p in part))
  
      return result