code: def test_initializer(self) -> None:
      initializer = cflearn.Initializer()
  
      @cflearn.register_initializer("all_one")
      def _(_: Any, parameter: Parameter) -> None:
          parameter.fill_(1.0)
  
      n = 100
      param = Parameter(torch.zeros(n))
      with torch.no_grad():
          initializer.initialize(param, "all_one")
  
      self.assertTrue(
          np.allclose(param.data.numpy(), np.ones(n, np.float32))
      )
  
file_path: carefree-learn/tests/test_register.py
imports: import os
  import torch
  import cflearn
  import platform
  import unittest
  import numpy
  from typing import Any
  from torch.nn import Parameter
label_desc: Use image node_id 1 for calling the TestRegister obj's underlying member method code with example usage: obj.test_initializer() without return types