def sample(self, num_samples, current_episode_steps):
    a = self.buffer[0:min(self.index, self.buffer_size)]
    if (len(self.buffer) > 0):
        return np.random.choice(a, min(num_samples, self.index))
    else:
        return []
def sample(self, num_samples, current_episode_steps):
    a = self.buffer[0:min(self.index, self.buffer_size)]
    if (len(self.buffer) > 0):
        return np.random.choice(a, min(num_samples, self.index))
    else:
        return []