code: def test_params_show_while_running_stage(tmp_dir, dvc):
      (tmp_dir / "params.yaml").dump({"foo": {"bar": 1}})
      (tmp_dir / "params.json").dump({"bar": 2})
  
      tmp_dir.gen(
          "merge.py",
          dedent(
              """
              import json
              from dvc import api
              with open("merged.json", "w") as f:
                  json.dump(api.params_show(stages="merge"), f)
          """
          ),
      )
      dvc.stage.add(
          name="merge",
          cmd="python merge.py",
          params=["foo.bar", {"params.json": ["bar"]}],
          outs=["merged.json"],
      )
  
      dvc.reproduce()
  
      assert (tmp_dir / "merged.json").parse() == {
          "foo": {"bar": 1},
          "bar": 2,
      }
  
imports: import json
  import os
  from textwrap import dedent
  from typing import Dict, List
  import pytest
  from dvc import api
label_desc: Use image node_id 9 for calling a global function with example usage: test_params_show_while_running_stage(tmp_dir, dvc) without return types