class_docstr: Construct the occupation number (maxed at 1) where the total sum of the
  output equals to a with length of the output is nlength.
  
  Examples
  --------
  >>> import torch
  >>> a = torch.tensor(2.5)
  >>> _OccNumber.apply(a, 2, 3, 3, torch.double, torch.device('cpu'))
  tensor([1.0000, 1.0000, 0.5000], dtype=torch.float64)
class_docstr_tok: ["Construct","the","occupation","number","(","maxed","at","1",")","where","the","total","sum","of","the","output","equals","to","a","with","length","of","the","output","is","nlength",".","Examples","--","--","--","--",">",">",">","import","torch",">",">",">","a","=","torch.tensor","(","2.5",")",">",">",">","_OccNumber.apply","(","a",",","2",",","3",",","3",",","torch.double",",","torch.device","(","'cpu","'",")",")","tensor","(","[","1.0000",",","1.0000",",","0.5000","]",",","dtype=torch.float64",")"]
docstr: Backward pass of the occupation number.
  
  Parameters
  ----------
  grad_res: torch.Tensor
      Gradient of the output
  
  Returns
  -------
  Tuple[torch.Tensor, None, None, None, None, None]
      Gradient of the input
docstr_tok: ["Backward","pass","of","the","occupation","number",".","Parameters","--","--","--","--","--","grad_res",":","torch.Tensor","Gradient","of","the","output","Returns","--","--","--","-","Tuple","[","torch.Tensor",",","None",",","None",",","None",",","None",",","None","]","Gradient","of","the","input"]
code: def backward(self, grad_res: torch.Tensor):  # type: ignore
      """Backward pass of the occupation number.
  
      Parameters
      ----------
      grad_res: torch.Tensor
          Gradient of the output
  
      Returns
      -------
      Tuple[torch.Tensor, None, None, None, None, None]
          Gradient of the input
  
      """
      grad_a = grad_res[self.ceil_a - 1]
      return (grad_a,) + (None,) * 5
  
file_path: deepchem/deepchem/utils/safeops_utils.py
imports: import math
  import torch
  from typing import Union, Optional, Tuple
label_desc: Use image node_id 2 for calling the _OccNumber obj's underlying member method code with example usage: obj.backward(grad_res) and returns: unknown