original_docstring: Randomly sample transitions from memory.
docstring: Randomly sample transitions from memory.
docstring_tokens: Randomly sample transitions from memory .
code: def sample(self, num):
      '''Randomly sample transitions from memory.'''
      batch = []
      while len(self.memory) > 0 and len(batch) < num:
        batch.append(self.memory.pop())
      return batch
code_tokens: def sample ( self , num ) : batch = [ ] while len ( self . memory ) > 0 and len ( batch ) < num : batch . append ( self . memory . pop ( ) ) return batch
short_docstring: Randomly sample transitions from memory.
short_docstring_tokens: Randomly sample transitions from memory .
comment: '''Randomly sample transitions from memory.'''