code: def populate_torchserve_env(torch_pkg):
      for pkg in torch_pkg:
          if pkg.split("==")[0] == "torch":
              torchserve_env["torch"] = pkg
          if pkg.split("==")[0] == "torchaudio":
              torchserve_env["torchaudio"] = pkg
          if pkg.split("==")[0] == "torchtext":
              torchserve_env["torchtext"] = pkg
          if pkg.split("==")[0] == "torchvision":
              torchserve_env["torchvision"] = pkg
          if (
              pkg.split("==")[0] == "torchserve"
              and len(torchserve_branch) == 0
          ):
              torchserve_env["torchserve"] = pkg
          if (
              pkg.split("==")[0] == "torch-model-archiver"
              and len(torchserve_branch) == 0
          ):
              torchserve_env["torch_model_archiver"] = pkg
      if len(torchserve_branch) > 0:
          torchserve_env["torchserve"] = (
              "torchserve==" + get_torchserve_version()
          )
          torchserve_env["torch_model_archiver"] = (
              "torch-model-archiver==" + get_torch_model_archiver()
          )
  
imports: import locale
  import os
  import re
  import subprocess
  import sys
label_desc: Use image node_id 23 for calling a global function with example usage: populate_torchserve_env(torch_pkg) without return types