code: def _categorical_dim(vals, initial):
      from guild._skopt.space import space
  
      return space.Categorical(vals), initial
  
imports: import logging
  import os
  import typing
  import warnings
  from guild import _skopt
  from guild import batch_util
  from guild import flag_util
  from guild import op_util
  from guild import query
label_desc: Use image node_id 8 for calling a global function with example usage: _categorical_dim(vals, initial) and returns: space,  initial