class_docstr: Helper class to simplify the handling of gradient buckets
class_docstr_tok: ["Helper","class","to","simplify","the","handling","of","gradient","buckets"]
docstr: Is there enough room in the bucket to add this parameter gradient, and is this param not already checked in ?
docstr_tok: ["Is","there","enough","room","in","the","bucket","to","add","this","parameter","gradient",",","and","is","this","param","not","already","checked","in","?"]
code: def can_add_grad_view(self, param: torch.Tensor) -> bool:
      """Is there enough room in the bucket to add this parameter gradient, and is this param not already checked in ?"""
      return (
          self._fill + param.numel() < self._max_size
          and id(param) not in self._param_ids
      )
  
imports: from typing import Any, Callable, List, Optional, Union
  import torch
label_desc: Use image node_id 4 for calling the GradBucket obj's underlying member method code with example usage: obj.can_add_grad_view(param) and returns: unknown