class_docstr: Class which performs validation of the submission.
class_docstr_tok: ["Class","which","performs","validation","of","the","submission","."]
docstr: Validates submission.
  
  Args:
    filename: submission filename
  
  Returns:
    submission metadata or None if submission is invalid
docstr_tok: ["Validates","submission",".","Args",":","filename",":","submission","filename","Returns",":","submission","metadata","or","None","if","submission","is","invalid"]
code: def validate_submission(self, filename):
      """Validates submission.
  
      Args:
        filename: submission filename
  
      Returns:
        submission metadata or None if submission is invalid
      """
      self._prepare_temp_dir()
      # Convert filename to be absolute path, relative path might cause problems
      # with mounting directory in Docker
      filename = os.path.abspath(filename)
      # extract submission
      if not self._extract_submission(filename):
          return None
      # verify submission size
      if not self._verify_submission_size():
          return None
      # Load metadata
      metadata = self._load_and_verify_metadata()
      if not metadata:
          return None
      submission_type = metadata["type"]
      # verify docker container size
      if not self._verify_docker_image_size(metadata["container_gpu"]):
          return None
      # Try to run submission on sample data
      self._prepare_sample_data(submission_type)
      if not self._run_submission(metadata):
          logging.error("Failure while running submission")
          return None
      if not self._verify_output(submission_type):
          logging.warning(
              "Some of the outputs of your submission are invalid or "
              "missing. You submission still will be evaluation "
              "but you might get lower score."
          )
      return metadata
  
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 10 for calling the SubmissionValidator obj's underlying member method code with example usage: obj.validate_submission(filename) and returns: metadata, None, None, None, None, None