code: def generate_data_with_categorical(
      num_instances=100,
      num_numerical=10,
      num_categorical=3,
      num_classes=5,
      dtype="np",
  ):
      categorical_data = np.random.randint(
          num_classes, size=(num_instances, num_categorical)
      )
      numerical_data = np.random.rand(num_instances, num_numerical)
      data = np.concatenate((numerical_data, categorical_data), axis=1)
      if data.dtype == np.float64:
          data = data.astype(np.float32)
      if dtype == "np":
          return data
      if dtype == "dataset":
          return tf.data.Dataset.from_tensor_slices(data)
  
file_path: autokeras/autokeras/test_utils.py
imports: import inspect
  import os
  import numpy
  import tensorflow
  from tensorflow import keras
  import autokeras
label_desc: Use image node_id 4 for calling a global function with example usage: generate_data_with_categorical(num_instances, num_numerical, num_categorical, num_classes, dtype) and returns: data, tf