code: def api_doc(self):
      return io.StringIO(
          textwrap.dedent(
              """
              .. currentmodule:: itertools
  
              Itertools
              ---------
  
              Infinite
              ~~~~~~~~
  
              .. autosummary::
  
                  cycle
                  count
  
              Finite
              ~~~~~~
  
              .. autosummary::
  
                  chain
  
              .. currentmodule:: random
  
              Random
              ------
  
              All
              ~~~
  
              .. autosummary::
  
                  seed
                  randint
              """
          )
      )
  
imports: import io
  import textwrap
  import pytest
  from scripts import validate_docstrings
label_desc: Use image node_id 1 for calling the TestApiItems obj's underlying member method code with example usage: obj.api_doc() and returns: io