def render_live_params(
    runner_parameters,
    action_parameters,
    params,
    action_context,
    additional_contexts=None,
):
    """
    Renders list of parameters. Ensures that there's no cyclic or missing dependencies. Returns a
    dict of plain rendered parameters.
    """
    additional_contexts = additional_contexts or {}

    pack = action_context.get("pack")
    user = action_context.get("user")

    try:
        config = get_config(pack, user)
    except Exception as e:
        LOG.info(
            "Failed to retrieve config for pack %s and user %s: %s"
            % (pack, user, six.text_type(e))
        )
        config = {}

    G = _create_graph(action_context, config)

    # Additional contexts are applied after all other contexts (see _create_graph), but before any
    # of the dependencies have been resolved.
    for name, value in six.iteritems(additional_contexts):
        G.add_node(name, value=value)

    [_process(G, name, value) for name, value in six.iteritems(params)]
    _process_defaults(G, [action_parameters, runner_parameters])
    _validate(G)

    context = _resolve_dependencies(G)
    live_params = _cast_params_from(
        params, context, [action_parameters, runner_parameters]
    )

    return live_params

    Renders list of parameters. Ensures that there's no cyclic or missing dependencies. Returns a
    dict of plain rendered parameters.
    
st2common/st2common/util/param.py