code: def test_chain_length() -> None:
      dim = 3
      multilist = VectorLinkedList(dimension=dim)
  
      new_node = VectorNode(dim)
      multilist.append(new_node, 0)
      assert multilist.chain_length(0) == 1
      assert multilist.chain_length(1) == 0
      assert multilist.chain_length(2) == 0
  
      another_node = VectorNode(dim)
      multilist.append(another_node, 0)
      assert multilist.chain_length(0) == 2
      assert multilist.chain_length(1) == 0
      assert multilist.chain_length(2) == 0
  
      multilist.append(another_node, 1)
      assert multilist.chain_length(0) == 2
      assert multilist.chain_length(1) == 1
      assert multilist.chain_length(2) == 0
  
      multilist.append(new_node, 2)
      assert multilist.chain_length(0) == 2
      assert multilist.chain_length(1) == 1
      assert multilist.chain_length(2) == 1
  
file_path: nevergrad/nevergrad/optimization/multiobjective/test_hypervolume.py
imports: import numpy
  from .hypervolume import VectorNode, VectorLinkedList, HypervolumeIndicator
label_desc: Use image node_id 6 for calling a global function with example usage: test_chain_length() without return types