code: def test_getparams():
      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)
      x = torch.tensor(0.4)
      alpha = A(a)
      assert alpha.mult(x) == torch.tensor(1.6)
      assert alpha.getparams("mult") == [torch.tensor(4.0)]
  
imports: import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_getparams() and returns: unknown, list