def METHOD_NAME(command):
  """Runs a command and prints it."""
  print(
      'Running command [{time}]:'.format(
          time=datetime.datetime.now().strftime('%H:%M:%S')),
      ' '.join(command))
  for _ in range(RETRY_COUNT):
    try:
      return subprocess.check_output(command, stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as e:
      print('Command failed with non-zero exit code. Output:\n%s' % e.output)
    print('Sleeping a few seconds before retrying.')
    time.sleep(random.randint(0, SLEEP_WAIT))
  print('Failed to run command, exiting.')
  sys.exit(-1)