def plan_hash(plan_name, plan)
      elements = plan.params_type.elements || []
      parameters = elements.each_with_object({}) do |param, acc|
        type = if param.value_type.is_a?(Puppet::Pops::Types::PTypeAliasType)
                 param.value_type.name
               else
                 param.value_type.to_s
               end
        acc[param.name] = { 'type' => type }
        acc[param.name]['default_value'] = nil if param.key_type.is_a?(Puppet::Pops::Types::POptionalType)
      end
      {
        'name' => plan_name,
        'parameters' => parameters
      }
    end
def plan_hash(plan_name, plan)
      elements = plan.params_type.elements || []
      parameters = elements.each_with_object({}) do |param, acc|
        type = if param.value_type.is_a?(Puppet::Pops::Types::PTypeAliasType)
                 param.value_type.name
               else
                 param.value_type.to_s
               end
        acc[param.name] = { 'type' => type }
        acc[param.name]['default_value'] = nil if param.key_type.is_a?(Puppet::Pops::Types::POptionalType)
      end
      {
        'name' => plan_name,
        'parameters' => parameters
      }
    end
This converts a plan signature object into a format used by the outputter.
 Must be called from within bolt compiler to pickup type aliases used in the plan signature.