code: def test_show_formats(self):
      with captured_stdout() as stdout:
          show_formats()
  
      # the output should be a header line + one line per format
      num_formats = len(ARCHIVE_FORMATS.keys())
      output = [
          line
          for line in stdout.getvalue().split("\n")
          if line.strip().startswith("--formats=")
      ]
      self.assertEqual(len(output), num_formats)
  
imports: import os
  import tarfile
  import unittest
  import warnings
  import zipfile
  from os.path import join
  from textwrap import dedent
  from test.test_support import captured_stdout, check_warnings, run_unittest
  from distutils.command.sdist import sdist, show_formats
  from distutils.core import Distribution
  from distutils.tests.test_config import PyPIRCCommandTestCase
  from distutils.errors import DistutilsOptionError
  from distutils.spawn import find_executable
  from distutils.log import WARN
  from distutils.filelist import FileList
  from distutils.archive_util import ARCHIVE_FORMATS
label_desc: Use image node_id 10 for calling the SDistTestCase obj's underlying member method code with example usage: obj.test_show_formats() without return types