code: def do_test(self, verbose=None):
      if verbose is not None:
          self.verbose = verbose
  
      num_module_to_test = len(self.test_book)
      num_module_pass = 0
      print(
          "Testing EasyOCR: {:d} modules will be tested.\n".format(
              num_module_to_test
          )
      )
      for name, tests in self.test_book.items():
          num_test = len(tests)
          num_passed = 0
          min_pass = sum(
              [test["severity"] == "Error" for test in tests.values()]
          )
          if self.verbose > 0:
              print(
                  "##Testing module {}: {:d} tests will be performed.".format(
                      name, num_test
                  )
              )
          for test_id, test in tests.items():
              if self.verbose > 1:
                  print(
                      "#### {}: {}".format(test_id, test["description"])
                  )
  
              if test["method"].startswith("unit_test."):
                  test["method"] = ".".join(
                      test["method"].split(".")[1:]
                  )
              test_method = self.get_nested_attr(self, test["method"])
  
              test["input"] = [
                  (
                      self.get_nested_attr(
                          self, ".".join(input_.split(".")[1:])
                      )
                      if input_.startswith("unit_test.")
                      else input_
                  )
                  if isinstance(input_, str)
                  else input_
                  for input_ in test["input"]
              ]
              if verbose > 3:
                  print("###### Input: {}".format(test["input"]))
              results = test_method(*test["input"])
              if verbose > 2:
                  print(
                      "###### Expected output: {}".format(
                          test["output"]
                      )
                  )
                  print("###### Received output: {}".format(results))
              test_result = self.validate(
                  results, test["output"], type(test["output"])
              )
              if test_result:
                  num_passed += 1
                  if self.verbose > 1:
                      print(
                          "#### Passed. [{:d}/{:d}]".format(
                              num_passed, num_test
                          )
                      )
              else:
                  if test["severity"] == "Warning":
                      num_passed += 1
                      if self.verbose > 1:
                          print(
                              "#### Passed. [{:d}/{:d}]".format(
                                  num_passed, num_test
                              )
                          )
                      if self.verbose > 2:
                          print(
                              "##### Warning: While the result is considered as passed, the test yields results ({}) \
                                that are different from the expected values ({}). It is strongly recommended to make sure \
                                that this is expected.".format(
                                  results, test["output"]
                              )
                          )
                  else:
                      if self.verbose > 1:
                          print("#### Failed")
                      if self.verbose > 2:
                          print(
                              "##### The test yields results ({}) which are different from the expected values ({})."
                          )
  
          if num_passed >= min_pass:
              num_module_pass += 1
              if self.verbose > 0:
                  print("##Module {}: Passed.\n".format(name))
          else:
              print("##Module {}: Failed.\n".format(name))
  
      print("#" * 50)
      if num_module_pass >= num_module_to_test:
          print("Testing completed:\n Final result: Passed.")
      else:
          print("Testing completed:\n Final result: Failed.")
  
imports: import os
  import sys
  import importlib
  import pickle
  import lzma
  import PIL.Image
  import numpy
  import torch
label_desc: Use image node_id 14 for calling the UnitTest obj's underlying member method code with example usage: obj.do_test(verbose) without return types