code: def test_memory_bank(self):
      device = "cuda" if torch.cuda.is_available() else "cpu"
      for model_name, config in self.resnet_variants.items():
          resnet = resnet_generator(model_name)
          model = NNCLR(get_backbone(resnet), **config).to(device)
  
          for nn_size in [2**3, 2**8]:
              nn_replacer = NNMemoryBankModule(
                  size=(nn_size, config["out_dim"])
              )
  
              with torch.no_grad():
                  for i in range(10):
                      x0 = torch.rand((self.batch_size, 3, 64, 64)).to(
                          device
                      )
                      x1 = torch.rand((self.batch_size, 3, 64, 64)).to(
                          device
                      )
                      (z0, p0), (z1, p1) = model(x0, x1)
                      z0 = nn_replacer(z0.detach(), update=False)
                      z1 = nn_replacer(z1.detach(), update=True)
  
file_path: lightly/tests/models/test_ModelsNNCLR.py
imports: import unittest
  import torch
  import torch.nn
  import torchvision
  from lightly.models import NNCLR
  from lightly.models.modules import NNMemoryBankModule
label_desc: Use image node_id 6 for calling the TestNNCLR obj's underlying member method code with example usage: obj.test_memory_bank() without return types