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: Forward pass of the occupation number.
  
  Parameters
  ----------
  a: torch.Tensor
      Total sum of the output
  floor_a: int
      Floor of a
  ceil_a: int
      Ceiling of a
  nlenght: int
      Length of the output
  dtype: torch.dtype
      Data type of the output
  device: torch.device
      Device of the output
  
  Returns
  -------
  torch.Tensor
      The constructed occupation number
docstr_tok: ["Forward","pass","of","the","occupation","number",".","Parameters","--","--","--","--","--","a",":","torch.Tensor","Total","sum","of","the","output","floor_a",":","int","Floor","of","a","ceil_a",":","int","Ceiling","of","a","nlenght",":","int","Length","of","the","output","dtype",":","torch.dtype","Data","type","of","the","output","device",":","torch.device","Device","of","the","output","Returns","--","--","--","-","torch.Tensor","The","constructed","occupation","number"]
code: def forward(  # type: ignore
      self,
      a: torch.Tensor,
      floor_a: int,
      ceil_a: int,
      nlength: int,
      dtype: torch.dtype,
      device: torch.device,
  ) -> torch.Tensor:
      """Forward pass of the occupation number.
  
      Parameters
      ----------
      a: torch.Tensor
          Total sum of the output
      floor_a: int
          Floor of a
      ceil_a: int
          Ceiling of a
      nlenght: int
          Length of the output
      dtype: torch.dtype
          Data type of the output
      device: torch.device
          Device of the output
  
      Returns
      -------
      torch.Tensor
          The constructed occupation number
  
      """
      res = _construct_occ_number(
          float(a.item()),
          floor_a,
          ceil_a,
          nlength,
          dtype=dtype,
          device=device,
      )
      self.ceil_a = ceil_a
      return res
  
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 1 for calling the _OccNumber obj's underlying member method code with example usage: obj.forward(a, floor_a, ceil_a, nlength, dtype, device) and returns: res