docstr: Setup any state tied to the execution of the given method in a class.
  It is invoked for every test method of a class.
docstr_tok: ["Setup","any","state","tied","to","the","execution","of","the","given","method","in","a","class",".","It","is","invoked","for","every","test","method","of","a","class","."]
code: def setup_method(self, method):
      """
      Setup any state tied to the execution of the given method in a class.
      It is invoked for every test method of a class.
      """
      K.set_image_dim_ordering("th")
      sparkConf = (
          init_spark_conf()
          .setMaster("local[4]")
          .setAppName("zoo test case")
          .set("spark.driver.memory", "5g")
      )
      assert (
          str(sparkConf.get("spark.shuffle.reduceLocality.enabled"))
          == "false"
      )
      assert (
          str(sparkConf.get("spark.serializer"))
          == "org.apache.spark.serializer.JavaSerializer"
      )
      assert SparkContext._active_spark_context is None
      self.sc = init_nncontext(sparkConf)
      self.sc.setLogLevel("ERROR")
      self.sqlContext = SQLContext(self.sc)
      self.tmp_dirs = []
  
imports: from __future__ import print_function
  import logging
  import shutil
  from unittest import TestCase
  import keras.backend
  from bigdl.dllib.nncontext import *
  from bigdl.dllib.feature.image import ImageSet
label_desc: Use image node_id 1 for calling the ZooTestCase obj's underlying member method code with example usage: obj.setup_method(method) without return types