code: def LoadInstallations(counter):
      
      process = subprocess.Popen(["pip", "list", "--format=json"],
                                 stdout=subprocess.PIPE)
      output, _ = process.communicate()
      installations = json.loads(output)
      for i in installations:
          counter.labels(i["name"], i["version"]).inc()
docs: Load installed packages and export the version map.
  
      This function may be called multiple times, but the counters will
      be increased each time. Since Prometheus counters are never
      decreased, the aggregated results will not make sense.