code: def sample(self, batch_size, batch_idxs=None):
      raise NotImplementedError()
  
imports: from __future__ import absolute_import
  from collections import deque, namedtuple
  import warnings
  import random
  import numpy
label_desc: Use image node_id 2 for calling the Memory obj's underlying member method code with example usage: obj.sample(batch_size, batch_idxs) without return types