class_docstr: Raised when attempting to execute a docker command.
code: def __init__(
      self,
      command_launched: List[str],
      return_code: int,
      stdout: Optional[bytes] = None,
      stderr: Optional[bytes] = None,
  ) -> None:
      command_launched_str = " ".join(command_launched)
      error_msg = (
          f"The docker command executed was `{command_launched_str}`.\n"
          f"It returned with code {return_code}\n"
      )
      if stdout is not None:
          error_msg += f"The content of stdout is '{stdout.decode()}'\n"
      else:
          error_msg += (
              "The content of stdout can be found above the "
              "stacktrace (it wasn't captured).\n"
          )
      if stderr is not None:
          error_msg += f"The content of stderr is '{stderr.decode()}'\n"
      else:
          error_msg += (
              "The content of stderr can be found above the "
              "stacktrace (it wasn't captured)."
          )
      super().__init__(error_msg)
  
imports: import json
  import logging
  import os
  import subprocess
  from typing import Any, Dict, List, Optional, Tuple, Union
  import requests
  from dockerpycreds.utils import find_executable
  from wandb.docker import auth, www_authenticate
  from wandb.errors import Error
label_desc: Use image node_id 1 to create a new DockerError object from inherited base classes: Error with example: obj = DockerError(command_launched, return_code, stdout, stderr)