code: def get_from_cmd(self, cmd: str, key: str):
      self.contdata[key] = self.ERROR
      p = subprocess.run(  # nosec B602
          f"bash -c '{cmd}'",
          shell=True,
          capture_output=True,
          check=False,
      )
      result = p.stdout.decode("utf-8")
      if p.returncode == 0:
          self.contdata[key] = result.strip()
          # Let the hacks begin...
          if key == "sm":
              smlist = result.split()
              self.contdata[key] = ", ".join(smlist)
          if key == "size":
              # pylint: disable=C0209
              self.contdata[key] = "{} GB".format(
                  round(int(result) / 1024**3, 2)
              )  # noqa
      else:
          logger.info("Command '%s' failed: %s", cmd, result)
  
imports: import argparse
  import json
  import logging
  import os
  import subprocess
  import sys
  from collections import defaultdict
  from datetime import date
  from datetime import datetime
  from pathlib import Path
  import yaml
  from github import Github
  from github.GithubException import GithubException
  from github.GitRef import GitRef
  from semver import VersionInfo
label_desc: Use image node_id 6 for calling the SupportMatrixExtractor obj's underlying member method code with example usage: obj.get_from_cmd(cmd, key) without return types