code: def test_workload_dis_factor():
      calc = auto_scheduler.utils.calc_workload_dis_factor
      decode = auto_scheduler.utils.decode_workload_key
  
      # Identical
      target_wkl_key = json.dumps(
          [
              "func1",
              [8, 3, 224, 224],
              [32, 3, 3, 3],
              [0, 0],
              [1, 1],
              "float32",
          ]
      )
      assert calc(decode(target_wkl_key), decode(target_wkl_key)) == 1
  
      # Compatible with a factor
      wkl_key = json.dumps(
          [
              "func1",
              [1, 3, 112, 112],
              [32, 3, 3, 3],
              [0, 0],
              [1, 1],
              "float32",
          ]
      )
      assert calc(decode(target_wkl_key), decode(wkl_key)) == 8 * 2 * 2
  
      # Incompatible argument with zeros
      wkl_key = json.dumps(
          [
              "func1",
              [8, 3, 224, 224],
              [32, 3, 3, 3],
              [1, 1],
              [1, 1],
              "float32",
          ]
      )
      assert calc(decode(target_wkl_key), decode(wkl_key)) == float(
          "inf"
      )
      wkl_key = json.dumps(
          [
              "func1",
              [8, 3, 224, 224],
              [32, 3, 3, 3],
              [0, 0],
              [0, 0],
              "float32",
          ]
      )
      assert calc(decode(target_wkl_key), decode(wkl_key)) == float(
          "inf"
      )
  
      # Incompatible non-integter argument
      wkl_key = json.dumps(
          [
              "func1",
              [8, 3, 224, 224],
              [32, 3, 3, 3],
              [0, 0],
              [1, 1],
              "int8",
          ]
      )
      assert calc(decode(target_wkl_key), decode(wkl_key)) == float(
          "inf"
      )
  
      # Incompatible function
      wkl_key = json.dumps(
          [
              "func2",
              [8, 3, 224, 224],
              [32, 3, 3, 3],
              [0, 0],
              [1, 1],
              "float32",
          ]
      )
      assert calc(decode(target_wkl_key), decode(wkl_key)) == float(
          "inf"
      )
  
      # Incompatible due to non-dividable factor
      wkl_key = json.dumps(
          [
              "func1",
              [8, 3, 223, 223],
              [32, 3, 3, 3],
              [0, 0],
              [1, 1],
              "float32",
          ]
      )
      assert calc(decode(target_wkl_key), decode(wkl_key)) == float(
          "inf"
      )
  
imports: import json
  import multiprocessing
  import numpy
  import tvm
  from tvm import topi
  from tvm import te, auto_scheduler
  import tempfile
  import tvm.testing
  import pickle
  from tvm.testing.auto_scheduler import matmul_auto_scheduler_test
  from tvm.auto_scheduler import workload_registry
label_desc: Use image node_id 7 for calling a global function with example usage: test_workload_dis_factor() without return types