code: def show_versions(show_dirs=True):
      """
      List the versions of statsmodels and any installed dependencies
  
      Parameters
      ----------
      show_dirs : bool
          Flag indicating to show module locations
      """
      if not show_dirs:
          _show_versions_only()
      print("\nINSTALLED VERSIONS")
      print("------------------")
      print("Python: %d.%d.%d.%s.%s" % sys.version_info[:])
      try:
          import os
  
          (sysname, nodename, release, version, machine) = os.uname()
          print(
              "OS: {} {} {} {}".format(
                  sysname, release, version, machine
              )
          )
          print("byteorder: %s" % sys.byteorder)
          print("LC_ALL: %s" % os.environ.get("LC_ALL", "None"))
          print("LANG: %s" % os.environ.get("LANG", "None"))
      except:
          pass
  
      try:
          import statsmodels
  
          has_sm = True
      except ImportError:
          has_sm = False
  
      print("\nstatsmodels\n===========\n")
      if has_sm:
          print(
              "Installed: {} ({})".format(
                  safe_version(statsmodels),
                  dirname(statsmodels.__file__),
              )
          )
      else:
          print("Not installed")
  
      print("\nRequired Dependencies\n=====================\n")
      try:
          import Cython
  
          print(
              "cython: {} ({})".format(
                  safe_version(Cython), dirname(Cython.__file__)
              )
          )
      except ImportError:
          print("cython: Not installed")
  
      try:
          import numpy
  
          print(
              "numpy: {} ({})".format(
                  safe_version(numpy, ["version", "version"]),
                  dirname(numpy.__file__),
              )
          )
      except ImportError:
          print("numpy: Not installed")
  
      try:
          import scipy
  
          print(
              "scipy: {} ({})".format(
                  safe_version(scipy, ["version", "version"]),
                  dirname(scipy.__file__),
              )
          )
      except ImportError:
          print("scipy: Not installed")
  
      try:
          import pandas
  
          print(
              "pandas: {} ({})".format(
                  safe_version(
                      pandas, ["version", "version"], "__version__"
                  ),
                  dirname(pandas.__file__),
              )
          )
      except ImportError:
          print("pandas: Not installed")
  
      try:
          import dateutil
  
          print(
              "    dateutil: {} ({})".format(
                  safe_version(dateutil), dirname(dateutil.__file__)
              )
          )
      except ImportError:
          print("    dateutil: not installed")
  
      try:
          import patsy
  
          print(
              "patsy: {} ({})".format(
                  safe_version(patsy), dirname(patsy.__file__)
              )
          )
      except ImportError:
          print("patsy: Not installed")
  
      print("\nOptional Dependencies\n=====================\n")
  
      try:
          import matplotlib as mpl
  
          print(
              "matplotlib: {} ({})".format(
                  safe_version(mpl), dirname(mpl.__file__)
              )
          )
          print("    backend: %s " % mpl.rcParams["backend"])
      except ImportError:
          print("matplotlib: Not installed")
  
      try:
          from cvxopt import info
  
          print(
              "cvxopt: {} ({})".format(
                  safe_version(info, "version"), dirname(info.__file__)
              )
          )
      except ImportError:
          print("cvxopt: Not installed")
  
      try:
          import joblib
  
          print(
              "joblib: {} ({})".format(
                  safe_version(joblib), dirname(joblib.__file__)
              )
          )
      except ImportError:
          print("joblib: Not installed")
  
      print("\nDeveloper Tools\n================\n")
  
      try:
          import IPython
  
          print(
              "IPython: {} ({})".format(
                  safe_version(IPython), dirname(IPython.__file__)
              )
          )
      except ImportError:
          print("IPython: Not installed")
      try:
          import jinja2
  
          print(
              "    jinja2: {} ({})".format(
                  safe_version(jinja2), dirname(jinja2.__file__)
              )
          )
      except ImportError:
          print("    jinja2: Not installed")
  
      try:
          import sphinx
  
          print(
              "sphinx: {} ({})".format(
                  safe_version(sphinx), dirname(sphinx.__file__)
              )
          )
      except ImportError:
          print("sphinx: Not installed")
  
      try:
          import pygments
  
          print(
              "    pygments: {} ({})".format(
                  safe_version(pygments), dirname(pygments.__file__)
              )
          )
      except ImportError:
          print("    pygments: Not installed")
  
      try:
          import pytest
  
          print(
              "pytest: {} ({})".format(
                  safe_version(pytest), dirname(pytest.__file__)
              )
          )
      except ImportError:
          print("pytest: Not installed")
  
      try:
          import virtualenv
  
          print(
              "virtualenv: {} ({})".format(
                  safe_version(virtualenv), dirname(virtualenv.__file__)
              )
          )
      except ImportError:
          print("virtualenv: Not installed")
  
      print("\n")
  
imports: from functools import reduce
  import sys
  from os.path import dirname
label_desc: Use image node_id 3 for calling a global function with example usage: show_versions(show_dirs) without return types