def _docker_prefix(docker_cmd=DEFAULT_DOCKER_COMMAND, sudo=DEFAULT_SUDO, sudo_cmd=DEFAULT_SUDO_COMMAND, host=DEFAULT_HOST, **kwds):
 command_parts = []
 if sudo:
  command_parts.append(sudo_cmd)
 command_parts.append(docker_cmd)
 if host:
  command_parts.extend(['-H', host])
 return command_parts

def _docker_prefix ( docker_cmd = DEFAULT_DOCKER_COMMAND , sudo = DEFAULT_SUDO , sudo_cmd = DEFAULT_SUDO_COMMAND , host = DEFAULT_HOST , ** kwds ) : command_parts = [ ] if sudo : command_parts . append ( sudo_cmd ) command_parts . append ( docker_cmd ) if host : command_parts . extend ( [ '-H' , host ] ) return command_parts
prefix to issue a docker command .