code: def test_raises_types(self):
      docstrings = [
          (
              """
  Example Function
  
  Raises
  ------
    RuntimeError
  
        A setting wasn't specified, or was invalid.
    ValueError
  
        Something something value error.
  
  """,
              """
  Example Function
  
  :raises RuntimeError: A setting wasn't specified, or was invalid.
  :raises ValueError: Something something value error.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  InvalidDimensionsError
  
  """,
              """
  Example Function
  
  :raises InvalidDimensionsError:
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  Invalid Dimensions Error
  
  """,
              """
  Example Function
  
  :raises Invalid Dimensions Error:
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  Invalid Dimensions Error
      With description
  
  """,
              """
  Example Function
  
  :raises Invalid Dimensions Error: With description
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  InvalidDimensionsError
      If the dimensions couldn't be parsed.
  
  """,
              """
  Example Function
  
  :raises InvalidDimensionsError: If the dimensions couldn't be parsed.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  Invalid Dimensions Error
      If the dimensions couldn't be parsed.
  
  """,
              """
  Example Function
  
  :raises Invalid Dimensions Error: If the dimensions couldn't be parsed.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  If the dimensions couldn't be parsed.
  
  """,
              """
  Example Function
  
  :raises If the dimensions couldn't be parsed.:
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  :class:`exc.InvalidDimensionsError`
  
  """,
              """
  Example Function
  
  :raises exc.InvalidDimensionsError:
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  :class:`exc.InvalidDimensionsError`
      If the dimensions couldn't be parsed.
  
  """,
              """
  Example Function
  
  :raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  :class:`exc.InvalidDimensionsError`
      If the dimensions couldn't be parsed,
      then a :class:`exc.InvalidDimensionsError` will be raised.
  
  """,
              """
  Example Function
  
  :raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed,
      then a :class:`exc.InvalidDimensionsError` will be raised.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  :class:`exc.InvalidDimensionsError`
      If the dimensions couldn't be parsed.
  :class:`exc.InvalidArgumentsError`
      If the arguments are invalid.
  
  """,
              """
  Example Function
  
  :raises exc.InvalidDimensionsError: If the dimensions couldn't be parsed.
  :raises exc.InvalidArgumentsError: If the arguments are invalid.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  CustomError
      If the dimensions couldn't be parsed.
  
  """,
              """
  Example Function
  
  :raises package.CustomError: If the dimensions couldn't be parsed.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  AnotherError
      If the dimensions couldn't be parsed.
  
  """,
              """
  Example Function
  
  :raises ~package.AnotherError: If the dimensions couldn't be parsed.
  """,
          ),
          ################################
          (
              """
  Example Function
  
  Raises
  ------
  :class:`exc.InvalidDimensionsError`
  :class:`exc.InvalidArgumentsError`
  
  """,
              """
  Example Function
  
  :raises exc.InvalidDimensionsError:
  :raises exc.InvalidArgumentsError:
  """,
          ),
      ]
      for docstring, expected in docstrings:
          translations = {
              "CustomError": "package.CustomError",
              "AnotherError": ":py:exc:`~package.AnotherError`",
          }
          config = Config(
              napoleon_type_aliases=translations,
              napoleon_preprocess_types=True,
          )
          app = mock.Mock()
          actual = str(NumpyDocstring(docstring, config, app, "method"))
          assert expected == actual
  
imports: import re
  from collections import namedtuple
  from inspect import cleandoc
  from textwrap import dedent
  from unittest import mock
  import pytest
  from sphinx.ext.napoleon import Config
  from sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring, _convert_numpy_type_spec, _recombine_set_tokens, _token_type, _tokenize_type_spec
  from tests.test_extensions.ext_napoleon_pep526_data_google import PEP526GoogleClass
  from tests.test_extensions.ext_napoleon_pep526_data_numpy import PEP526NumpyClass
label_desc: Use image node_id 13 for calling the TestNumpyDocstring obj's underlying member method code with example usage: obj.test_raises_types() without return types