code: def test_forward__no_dim(self) -> None:
      torch.manual_seed(0)
      # Only specify size but not feature dimension.
      memory_bank = MemoryBankModule(size=5, feature_dim_first=False)
      x0 = torch.randn(3, 2)
      out0, bank0 = memory_bank(x0, update=True)
      # Verify that output is same as input.
      assert out0.tolist() == x0.tolist()
      # Verify that memory bank was initialized and has correct shape.
      assert bank0.shape == (5, 2)
      assert memory_bank.bank.shape == (5, 2)
      # Verify that output bank does not contain features from x0.
      assert bank0[:3].tolist() != x0.tolist()
      # Verify that memory bank was updated.
      assert memory_bank.bank[:3].tolist() == x0.tolist()
  
file_path: lightly/tests/models/modules/test_memory_bank.py
imports: import re
  import unittest
  import pytest
  import torch
  from lightly.models.modules.memory_bank import MemoryBankModule
label_desc: Use image node_id 4 for calling the TestMemoryBank obj's underlying member method code with example usage: obj.test_forward__no_dim() without return types