code: def test_builder_to_backend_smoke(self, use_cpu_only, backend):
      x_val = np.array([1], dtype=np.int32)
      input_placeholders = {"x": mb.placeholder(shape=x_val.shape)}
      input_values = {"x": x_val}
  
      def build(x):
          return [
              mb.random_categorical(x=x, seed=1),
              mb.random_categorical(x=x, seed=1, size=4),
          ]
  
      expected_outputs = [
          np.array(np.zeros(shape=(1,)), dtype=np.float32),
          np.array(np.zeros(shape=(4,)), dtype=np.float32),
      ]
  
      expected_output_types = [
          o.shape[:] + (types.fp32,) for o in expected_outputs
      ]
  
      run_compare_builder(
          build,
          input_placeholders,
          input_values,
          expected_output_types,
          expected_outputs=expected_outputs,
          use_cpu_only=use_cpu_only,
          backend=backend,
      )
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/mil/ops/tests/test_random.py
imports: from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.testing_reqs import *
  from coremltools.converters.mil.testing_utils import get_core_ml_prediction
  from coremltools._deps import _IS_MACOS
  from .testing_utils import UNK_SYM, run_compare_builder
label_desc: Use image node_id 2 for calling the TestRandomCategorical obj's underlying member method code with example usage: obj.test_builder_to_backend_smoke(use_cpu_only, backend) and returns: list