code: def generate_rotation_2d(rng, B):
      rotates = []
      for i in range(B):
          degree = 2 * np.pi * (2.0 * rng.rand() - 1.0)
          c, s = np.cos(degree), np.sin(degree)
          rotate = np.asarray([[c, -s], [s, c]])
          rotates.append(rotate)
      return np.asarray(rotates)
  
imports: from __future__ import division
  from six.moves import range
  import itertools
  import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: generate_rotation_2d(rng, B) and returns: np