class_docstr: EditableModule is a base class to enable classes that it inherits be
  converted to pure functions for higher order derivatives purpose.
  
  Usage
  -----
  To use this class, the user must implement the ``getparamnames`` method
  which returns a list of tensor names that affect the output of the method
  with name indicated in ``methodname``.
  
  Used in:
  
  - Classes of Density Functional Theory (DFT).
  
  - It can also be used in other classes that need to be converted to pure
    functions for higher order derivatives purpose.
  
  Examples
  --------
  >>> import torch
  >>> from deepchem.utils.differentiation_utils import EditableModule
  >>> 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()
  >>> a = torch.tensor(2.0).requires_grad_()
  >>> x = torch.tensor(0.4).requires_grad_()
  >>> alpha = A(a)
  >>> alpha.mult(x)
  tensor(1.6000, grad_fn=<MulBackward0>)
  >>> alpha.getparamnames("mult")
  ['b']
  >>> alpha.assertparams(alpha.mult, x)
  "mult" method check done
docstr: Perform a rigorous check on the implemented ``getparamnames``
  in the class for a given method and its parameters as well as keyword
  Parameters.
  It raises warnings if there are missing or excess parameters in the
  ``getparamnames`` implementation.
  
  Parameters
  ---------
  method: Callable
      The method of this class to be tested
  *args:
      Parameters of the method
  **kwargs:
      Keyword parameters of the method
docstr_tok: ["Perform","a","rigorous","check","on","the","implemented","``","getparamnames","``","in","the","class","for","a","given","method","and","its","parameters","as","well","as","keyword","Parameters",".","It","raises","warnings","if","there","are","missing","or","excess","parameters","in","the","``","getparamnames","``","implementation",".","Parameters","--","--","--","--","-","method",":","Callable","The","method","of","this","class","to","be","tested","*","args",":","Parameters","of","the","method","*","*","kwargs",":","Keyword","parameters","of","the","method"]
code: def assertparams(self, method: Callable, *args, **kwargs):
      """
      Perform a rigorous check on the implemented ``getparamnames``
      in the class for a given method and its parameters as well as keyword
      Parameters.
      It raises warnings if there are missing or excess parameters in the
      ``getparamnames`` implementation.
  
      Parameters
      ---------
      method: Callable
          The method of this class to be tested
      *args:
          Parameters of the method
      **kwargs:
          Keyword parameters of the method
  
      """
      # check the method input
      if not inspect.ismethod(method):
          raise TypeError("The input method must be a method")
      methodself = method.__self__
      if methodself is not self:
          raise RuntimeError(
              "The method does not belong to the same instance"
          )
  
      methodname = method.__name__
  
      # assert if the method preserve the float tensors of the object
      self.__assert_method_preserve(method, *args, **kwargs)
      self.__assert_get_correct_params(
          method, *args, **kwargs
      )  # check if getparams returns the correct tensors
      print('"%s" method check done' % methodname)
  
imports: import inspect
  import warnings
  from abc import abstractmethod
  import copy
  import torch
  from typing import Sequence, Union, Dict, List, Callable, Any
  from deepchem.utils.attribute_utils import get_attr, set_attr, del_attr
label_desc: Use image node_id 8 for calling the EditableModule obj's underlying member method code with example usage: obj.assertparams(method) without return types