code: def test_show_versions(tmpdir):
      # GH39701
      as_json = os.path.join(tmpdir, "test_output.json")
  
      pd.show_versions(as_json=as_json)
  
      with open(as_json, encoding="utf-8") as fd:
          # check if file output is valid JSON, will raise an exception if not
          result = json.load(fd)
  
      # Basic check that each version element is found in output
      expected = {
          "system": _get_sys_info(),
          "dependencies": _get_dependency_info(),
      }
  
      assert result == expected
  
file_path: pandas/pandas/tests/util/test_show_versions.py
imports: import json
  import os
  import re
  from pandas.util._print_versions import _get_dependency_info, _get_sys_info
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: test_show_versions(tmpdir) without return types