class_docstr: Class which performs validation of the submission.
class_docstr_tok: ["Class","which","performs","validation","of","the","submission","."]
docstr: Cleans up and prepare temporary directory.
docstr_tok: ["Cleans","up","and","prepare","temporary","directory","."]
code: def _prepare_temp_dir(self):
      """Cleans up and prepare temporary directory."""
      if not shell_call(
          ["sudo", "rm", "-rf", os.path.join(self._temp_dir, "*")]
      ):
          logging.error("Failed to cleanup temporary directory.")
          sys.exit(1)
      # NOTE: we do not create self._extracted_submission_dir
      # this is intentional because self._tmp_extracted_dir or it's subdir
      # will be renames into self._extracted_submission_dir
      os.mkdir(self._tmp_extracted_dir)
      os.mkdir(self._sample_input_dir)
      os.mkdir(self._sample_output_dir)
      # make output dir world writable
      shell_call(["chmod", "a+rwX", "-R", self._sample_output_dir])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from builtins import int
  import csv
  import json
  import logging
  import os
  import re
  import subprocess
  import sys
  import numpy
  from PIL import Image
  from six import iteritems
label_desc: Use image node_id 2 for calling the SubmissionValidator obj's underlying member method code with example usage: obj._prepare_temp_dir() without return types