code: def dense_ref_data(
      random_seed,
      batch_size,
      in_dim,
      out_dim,
      use_bias,
      in_dtype,
      out_dtype,
  ):
      np.random.seed(random_seed)
  
      if "float" in in_dtype:
          a_np = np.random.uniform(size=(batch_size, in_dim)).astype(
              in_dtype
          )
          b_np = np.random.uniform(size=(out_dim, in_dim)).astype(
              in_dtype
          )
          c_np = np.random.uniform(size=(out_dim,)).astype(out_dtype)
      elif in_dtype == "int8":
          a_np = np.random.randint(
              low=-128, high=127, size=(batch_size, in_dim)
          ).astype(in_dtype)
          b_np = np.random.randint(
              low=-128, high=127, size=(out_dim, in_dim)
          ).astype(in_dtype)
          c_np = np.random.randint(
              low=-128, high=127, size=(out_dim,)
          ).astype(out_dtype)
      else:
          raise ValueError(
              "No method to generate test data for data type '{}'".format(
                  in_dtype
              )
          )
  
      matmul = np.dot(a_np.astype(out_dtype), b_np.T.astype(out_dtype))
  
      if use_bias:
          matmul += c_np
  
      d_np = np.maximum(matmul, 0)
      return (a_np, b_np, c_np, d_np)
  
file_path: tvm/tests/python/topi/test_topi_dense.py
imports: import contextlib
  import numpy
  import pytest
  import sys
  import tvm
  import tvm.testing
  import tvm.topi.testing
  from tvm import te, topi
  from tvm.topi.utils import get_const_tuple
  from common import Int8Fallback
label_desc: Use image node_id 1 for calling a global function with example usage: dense_ref_data(random_seed, batch_size, in_dim, out_dim, use_bias, in_dtype, out_dtype) and returns: a_np,  b_np,  c_np,  d_np