def METHOD_NAME(self, p, grad):
    assert self._grad_stats.unreleased_grad_flag[p]
    free_storage(grad)
    self._grad_stats.unreleased_grad_volume -= grad.numel() * grad.element_size()
    self._grad_stats.unreleased_grad_flag[p] = False