def render_template_with_system_context(value, context=None, prefix=None):
    """
    Render provided template with a default system context.

    :param value: Template string.
    :type value: ``str``

    :param context: Template context (optional).
    :type context: ``dict``

    :param prefix: Datastore key prefix (optional).
    :type prefix: ``str``

    :rtype: ``str``
    """
    context = context or {}
    context[DATASTORE_PARENT_SCOPE] = {
        SYSTEM_SCOPE: KeyValueLookup(prefix=prefix, scope=FULL_SYSTEM_SCOPE)
    }

    rendered = render_template(value=value, context=context)
    return rendered

    Render provided template with a default system context.

    :param value: Template string.
    :type value: ``str``

    :param context: Template context (optional).
    :type context: ``dict``

    :param prefix: Datastore key prefix (optional).
    :type prefix: ``str``

    :rtype: ``str``
    
st2common/st2common/util/templating.py