code: def _enumerate_shifted_anchor(
      anchor_base, feat_stride, height, width
  ):
      # Enumerate all shifted anchors:
      #
      # add A anchors (1, A, 4) to
      # cell K shifts (K, 1, 4) to get
      # shift anchors (K, A, 4)
      # reshape to (K*A, 4) shifted anchors
      xp = cuda.get_array_module(anchor_base)
      shift_y = xp.arange(0, height * feat_stride, feat_stride)
      shift_x = xp.arange(0, width * feat_stride, feat_stride)
      shift_x, shift_y = xp.meshgrid(shift_x, shift_y)
      shift = xp.stack(
          (
              shift_y.ravel(),
              shift_x.ravel(),
              shift_y.ravel(),
              shift_x.ravel(),
          ),
          axis=1,
      )
  
      A = anchor_base.shape[0]
      K = shift.shape[0]
      anchor = anchor_base.reshape((1, A, 4)) + shift.reshape(
          (1, K, 4)
      ).transpose((1, 0, 2))
      anchor = anchor.reshape((K * A, 4)).astype(np.float32)
      return anchor
  
file_path: chainercv/chainercv/links/model/faster_rcnn/region_proposal_network.py
imports: import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  import chainer.links
  from chainercv.links.model.faster_rcnn.utils.generate_anchor_base import generate_anchor_base
  from chainercv.links.model.faster_rcnn.utils.proposal_creator import ProposalCreator
label_desc: Use image node_id 1 for calling a global function with example usage: _enumerate_shifted_anchor(anchor_base, feat_stride, height, width) and returns: anchor