import json


def RunScriptsAndParseOutput(launch_command, vm):
  """A function to launch the command and return the performance.

  Args:
    launch_command: Arguments to the script driver.
    vm: Client vm on which the script will be run.

  Returns:
    json representation of the performance results.
  """
  stdout, _ = vm.RemoteCommand(launch_command)
  performance = json.loads(stdout)
  return performance