code: def exec_command(
      container,
      command,
      user="root",
      silent=False,
      verbose=False,
      ignore_error=True,
  ):
      command_prefix = "bash -c '"
      if not silent:
          print(
              "".join(
                  [
                      BOLD,
                      BLUE,
                      user,
                      "@",
                      get_container_name(container),
                      ENDC,
                      "$ ",
                      str(command),
                  ]
              )
          )
  
      command_result = container.exec_run(
          command_prefix + command + "'", user=user
      )
      if not silent and verbose and command_result.exit_code:
          print(
              "".join(
                  [
                      RED,
                      'Command: "',
                      command,
                      '" exited with error: ',
                      str(command_result.exit_code),
                      ENDC,
                  ]
              )
          )
          print("Error:")
      if not silent:
          out = command_result.output.decode().strip()
          if out:
              print(out)
      if not ignore_error and command_result.exit_code:
          exit(1)
      return command_result
  
file_path: carla/Util/Docker/docker_utils.py
imports: import tarfile
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: exec_command(container, command, user, silent, verbose, ignore_error) and returns: command_result