code: def test_method_docs(doc):
      assert (
          doc(ExamplePythonTypes.get_dict)
          == """
          get_dict(self: m.ExamplePythonTypes) -> dict
  
          Return a Python dictionary
      """
      )
      assert (
          doc(ExamplePythonTypes.get_dict_2)
          == """
          get_dict_2(self: m.ExamplePythonTypes) -> Dict[str, str]
  
          Return a C++ dictionary
      """
      )
      assert (
          doc(ExamplePythonTypes.get_list)
          == """
          get_list(self: m.ExamplePythonTypes) -> list
  
          Return a Python list
      """
      )
      assert (
          doc(ExamplePythonTypes.get_list_2)
          == """
          get_list_2(self: m.ExamplePythonTypes) -> List[str]
  
          Return a C++ list
      """
      )
      assert (
          doc(ExamplePythonTypes.get_dict)
          == """
          get_dict(self: m.ExamplePythonTypes) -> dict
  
          Return a Python dictionary
      """
      )
      assert (
          doc(ExamplePythonTypes.get_set)
          == """
          get_set(self: m.ExamplePythonTypes) -> set
  
          Return a Python set
      """
      )
      assert (
          doc(ExamplePythonTypes.get_set2)
          == """
          get_set2(self: m.ExamplePythonTypes) -> Set[str]
  
          Return a C++ set
      """
      )
      assert (
          doc(ExamplePythonTypes.get_array)
          == """
          get_array(self: m.ExamplePythonTypes) -> List[str[2]]
  
          Return a C++ array
      """
      )
      assert (
          doc(ExamplePythonTypes.get_valarray)
          == """
          get_valarray(self: m.ExamplePythonTypes) -> List[int]
  
          Return a C++ valarray
      """
      )
      assert (
          doc(ExamplePythonTypes.print_dict)
          == """
          print_dict(self: m.ExamplePythonTypes, arg0: dict) -> None
  
          Print entries of a Python dictionary
      """
      )
      assert (
          doc(ExamplePythonTypes.print_dict_2)
          == """
          print_dict_2(self: m.ExamplePythonTypes, arg0: Dict[str, str]) -> None
  
          Print entries of a C++ dictionary
      """
      )
      assert (
          doc(ExamplePythonTypes.print_set)
          == """
          print_set(self: m.ExamplePythonTypes, arg0: set) -> None
  
          Print entries of a Python set
      """
      )
      assert (
          doc(ExamplePythonTypes.print_set_2)
          == """
          print_set_2(self: m.ExamplePythonTypes, arg0: Set[str]) -> None
  
          Print entries of a C++ set
      """
      )
      assert (
          doc(ExamplePythonTypes.print_list)
          == """
          print_list(self: m.ExamplePythonTypes, arg0: list) -> None
  
          Print entries of a Python list
      """
      )
      assert (
          doc(ExamplePythonTypes.print_list_2)
          == """
          print_list_2(self: m.ExamplePythonTypes, arg0: List[str]) -> None
  
          Print entries of a C++ list
      """
      )
      assert (
          doc(ExamplePythonTypes.print_array)
          == """
          print_array(self: m.ExamplePythonTypes, arg0: List[str[2]]) -> None
  
          Print entries of a C++ array
      """
      )
      assert (
          doc(ExamplePythonTypes.pair_passthrough)
          == """
          pair_passthrough(self: m.ExamplePythonTypes, arg0: Tuple[bool, str]) -> Tuple[str, bool]
  
          Return a pair in reversed order
      """
      )
      assert (
          doc(ExamplePythonTypes.tuple_passthrough)
          == """
          tuple_passthrough(self: m.ExamplePythonTypes, arg0: Tuple[bool, str, int]) -> Tuple[int, str, bool]
  
          Return a triple in reversed order
      """
      )  # noqa: E501 line too long
      assert (
          doc(ExamplePythonTypes.throw_exception)
          == """
          throw_exception(self: m.ExamplePythonTypes) -> None
  
          Throw an exception
      """
      )
      assert (
          doc(ExamplePythonTypes.new_instance)
          == """
          new_instance() -> m.ExamplePythonTypes
  
          Return an instance
      """
      )
  
file_path: coremltools/deps/pybind11/tests/test_python_types.py
imports: import pytest
  from pybind11_tests import ExamplePythonTypes, ConstructorStats, has_optional, has_exp_optional
label_desc: Use image node_id 5 for calling a global function with example usage: test_method_docs(doc) without return types