class_docstr: Implementation of PureFunction for EditableModule.
  
  Examples
  --------
  >>> import torch
  >>> from deepchem.utils.differentiation_utils import EditableModule, get_pure_function
  >>> class A(EditableModule):
  ...     def __init__(self, a):
  ...         self.b = a*a
  ...     def mult(self, x):
  ...         return self.b * x
  ...     def getparamnames(self, methodname, prefix=""):
  ...         if methodname == "mult":
  ...             return [prefix+"b"]
  ...         else:
  ...             raise KeyError()
  >>> B = A(4)
  >>> m = get_pure_function(B.mult)
  >>> m.set_objparams([3])
  >>> m(2)
  6
class_docstr_tok: ["Implementation","of","PureFunction","for","EditableModule",".","Examples","--","--","--","--",">",">",">","import","torch",">",">",">","from","deepchem.utils.differentiation_utils","import","EditableModule",",","get_pure_function",">",">",">","class","A","(","EditableModule",")",":","...","def","__init__","(","self",",","a",")",":","...","self.b","=","a","*","a","...","def","mult","(","self",",","x",")",":","...","return","self.b","*","x","...","def","getparamnames","(","self",",","methodname",",","prefix=","''","''",")",":","...","if","methodname","==","``","mult","''",":","...","return","[","prefix+","''","b","''","]","...","else",":","...","raise","KeyError","(",")",">",">",">","B","=","A","(","4",")",">",">",">","m","=","get_pure_function","(","B.mult",")",">",">",">","m.set_objparams","(","[","3","]",")",">",">",">","m","(","2",")","6"]
docstr: Get the initial object parameters.
  
  Returns
  -------
  List
      The initial object parameters
docstr_tok: ["Get","the","initial","object","parameters",".","Returns","--","--","--","-","List","The","initial","object","parameters"]
code: def _get_all_obj_params_init(self) -> List:
      """Get the initial object parameters.
  
      Returns
      -------
      List
          The initial object parameters
  
      """
      return list(self.obj.getparams(self.method.__name__))
  
imports: import torch
  import inspect
  from typing import Callable, List, Tuple, Union
  from deepchem.utils.attribute_utils import set_attr, del_attr
  from deepchem.utils.differentiation_utils import EditableModule
  from deepchem.utils.misc_utils import Uniquifier
  from contextlib import contextmanager
  from abc import abstractmethod
label_desc: Use image node_id 2 for calling the EditableModulePureFunction obj's underlying member method code with example usage: obj._get_all_obj_params_init() and returns: list