code: def type_inference(self):
      output_shape = self.x.shape[:-1] + (self.size.val,)
      return types.tensor(types.fp32, output_shape)
  
imports: from coremltools.converters.mil.mil.types.symbolic import any_symbolic
  from coremltools.converters.mil.mil import get_new_symbol, get_new_variadic_symbol
  from ._op_reqs import *
label_desc: Use image node_id 2 for calling the random_categorical obj's underlying member method code with example usage: obj.type_inference() and returns: types