code: def test_list(capture, doc):
      assert m.list_no_args() == []
      assert m.list_ssize_t() == []
      assert m.list_size_t() == []
      lins = [1, 2]
      m.list_insert_ssize_t(lins)
      assert lins == [1, 83, 2]
      m.list_insert_size_t(lins)
      assert lins == [1, 83, 2, 57]
  
      with capture:
          lst = m.get_list()
          assert lst == ["inserted-0", "overwritten", "inserted-2"]
  
          lst.append("value2")
          m.print_list(lst)
      assert (
          capture.unordered
          == """
          Entry at position 0: value
          list item 0: inserted-0
          list item 1: overwritten
          list item 2: inserted-2
          list item 3: value2
      """
      )
  
      assert doc(m.get_list) == "get_list() -> list"
      assert doc(m.print_list) == "print_list(arg0: list) -> None"
  
imports: import contextlib
  import sys
  import types
  import pytest
  import env
  from pybind11_tests import detailed_error_messages_enabled
  from pybind11_tests import pytypes
label_desc: Use image node_id 9 for calling a global function with example usage: test_list(capture, doc) without return types