code: def random_pos(self, context_iterable, num_permutations):
          
          position_list = []
          for contxt, n in context_iterable:
              pos_array = self.random_context_pos(n, num_permutations, contxt)
              position_list.append([contxt, pos_array])
          return position_list
docs: Obtains random positions w/ replacement which match sequence context.
  
          Parameters
          ----------
          context_iterable: iterable containing two element tuple
              Records number of mutations in each context. context_iterable
              should be something like [('AA', 5), ...].
          num_permutations : int
              Number of permutations used in the permutation test.
  
          Returns
          -------
          position_list : list
              Contains context string and the randomly chosen positions
              for that context.