code: def vmstat(stat):
      
      out = subprocess.check_output(["vmstat", "-s"])
      stat = stat.encode("ascii")
      for line in out.split(b"\n"):
          line = line.strip()
          if stat in line:
              return int(line.split(b" ")[0])
      raise ValueError("Can't find {} in 'vmstat' output.".format(stat))
docs: Run vmstat and get a particular statistic.
  
      Args:
          stat: The statistic that we are interested in retrieving.
  
      Returns:
          The parsed output.