code: def get_megatron_version():
      p = os.popen("pip list --format=columns | grep megatron-lm")
      pip_list = p.read()
      assert (
          "megatron-lm" in pip_list
      ), "Please install Megatron-LM before getting its version"
      ver_str = pip_list.split()[1]
      return float(ver_str[0])
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/tests/unit/megatron_model.py
imports: import torch
  import os
  import sys
  import math
  from .common import get_test_path
  from deepspeed.pipe import PipelineModule, LayerSpec
label_desc: Use image node_id 1 for calling a global function with example usage: get_megatron_version() and returns: float