code: def shell_run_with_retry(cmd, retries=1, **kwargs):
      for i in range(retries + 1):
          try:
              if i > 0:
                  tf.logging.info("Retry %d for %s", i, cmd)
              cloud.shell_run(cmd, **kwargs)
              return
          except sp.CalledProcessError as e:
              if i == retries:
                  raise e
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  import multiprocessing
  import os
  import socket
  import subprocess
  import time
  from tensor2tensor.utils import cloud_mlengine
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: shell_run_with_retry(cmd, retries) without return types