code: def pixel_indices(conv, mt, pr, qs):
      T, R, S = conv.TRS
      D, H, W = conv.DHW
      C = conv.C
      HW = H * W
      DHW = D * H * W
      imax = C * DHW
  
      idx = []
      for c in range(C):
          ci = c * DHW
  
          for t in range(T):
              z = mt + t
              zi = ci + z * HW
              zb = z >= 0 and z < D
  
              for r in range(R):
                  y = pr + r
                  yi = zi + y * W
                  yb = zb and y >= 0 and y < H
  
                  for s in range(S):
                      x = qs + s
                      if yb and x >= 0 and x < W:
                          xi = yi + x
                      else:
                          xi = imax  # out of bounds
  
                      idx.append(xi)
      return idx
  
file_path: neon/tests/test_backend_conv_layer.py
imports: import itertools
  import numpy
  import pytest
  from timeit import default_timer
  from utils import allclose_with_out
  from neon import logger
label_desc: Use image node_id 2 for calling a global function with example usage: pixel_indices(conv, mt, pr, qs) and returns: idx