code: def dockerKill(container_name, client, gentleKill=False):
      
      try:
          this_container = client.containers.get(container_name)
          while this_container.status == 'running':
              if gentleKill is False:
                  client.containers.get(container_name).kill()
              else:
                  client.containers.get(container_name).stop()
              this_container = client.containers.get(container_name)
      except NotFound:
          logger.debug("Attempted to stop container, but container != exist: ",
                        container_name)
      except requests.exceptions.HTTPError as e:
          logger.debug("Attempted to stop container, but server gave an error: ",
                        container_name)
          raise create_api_error_from_http_exception(e)
docs: Immediately kills a container.  Equivalent to "docker kill":
      https://docs.docker.com/engine/reference/commandline/kill/
      :param container_name: Name of the container being killed.
      :param client: The docker API client object to call.