class_docstr: Random Op Superclass
class_docstr_tok: ["Random","Op","Superclass"]
code: def type_inference(self):
      if any_symbolic(self.shape.shape):
          # We can't infer any shape if shape has variable length.
          return types.tensor(
              self.out_dtype, (get_new_variadic_symbol(),)
          )
  
      # shape has fixed length here.
      if self.shape.sym_val is None:
          shape = tuple(
              [get_new_symbol() for _ in range(self.shape.shape[0])]
          )
          return types.tensor(self.out_dtype, shape)
  
      return types.tensor(
          self.out_dtype, tuple(self.shape.sym_val.tolist())
      )
  
imports: from coremltools.converters.mil.mil import get_new_symbol, get_new_variadic_symbol, types
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, TensorInputType
  from coremltools.converters.mil.mil.operation import Operation
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic
label_desc: Use image node_id 1 for calling the RandomDistribution obj's underlying member method code with example usage: obj.type_inference() and returns: types, types, types