code: def _get_nondiagonal_pairs(n: int) -> np.ndarray:
      """Get the indices of a square matrix with size n, excluding the diagonal."""
      rows, cols = np.tril_indices(n, -1)  # -1 to exclude diagonal
  
      # Combine rows-cols and cols-rows pairs
      pairs = np.column_stack(
          [np.concatenate([rows, cols]), np.concatenate([cols, rows])]
      )
  
      return pairs
  
file_path: emcee/src/emcee/moves/de.py
imports: from functools import lru_cache
  import numpy
  from .red_blue import RedBlueMove
label_desc: Use image node_id 1 for calling a global function with example usage: _get_nondiagonal_pairs(n) and returns: pairs