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.
      """
      sparkConf = (
          init_spark_conf()
          .setMaster("local[4]")
          .setAppName("zoo test case")
          .set("spark.driver.memory", "5g")
      )
      invalidInputError(
          str(sparkConf.get("spark.shuffle.reduceLocality.enabled"))
          == "false",
          "expect spark.shuffle.reduceLocality.enabled == false in spark conf",
      )
      invalidInputError(
          str(sparkConf.get("spark.serializer"))
          == "org.apache.spark.serializer.JavaSerializer",
          "expect spark.serializer == org.apache.spark.serializer.JavaSerializer in spark conf",
      )
      invalidInputError(
          SparkContext._active_spark_context is None,
          "SparkContext._active_spark_context should be none",
      )
      self.sc = init_nncontext(sparkConf)
      self.sc.setLogLevel("ERROR")
      self.sqlContext = SQLContext(self.sc)
      self.tmp_dirs = []
  
file_path: BigDL/python/orca/src/bigdl/orca/test_zoo_utils.py
imports: from __future__ import print_function
  import logging
  import shutil
  from unittest import TestCase
  from bigdl.dllib.nncontext import *
  from bigdl.dllib.feature.image import ImageSet
  from bigdl.dllib.utils.log4Error import *
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