code: def getpluginversioninfo(config):
      lines = []
      plugininfo = config.pluginmanager.list_plugin_distinfo()
      if plugininfo:
          lines.append("setuptools registered plugins:")
          for plugin, dist in plugininfo:
              loc = getattr(plugin, "__file__", repr(plugin))
              content = "%s-%s at %s" % (
                  dist.project_name,
                  dist.version,
                  loc,
              )
              lines.append("  " + content)
      return lines
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  from argparse import Action
  import py
  import pytest
  from _pytest.config import PrintHelp
label_desc: Use image node_id 6 for calling a global function with example usage: getpluginversioninfo(config) and returns: lines