def assign_instance_template_file(self, request, template_file):
    """
    Assigns the various instance related attributes to the
    given template file.

    The instance attributes include the instance itself, the
    associated system, and the associated plugin.

    :type request: Request
    :param request: The request that is going to be used for the
    closure with some of the operations.
    :type template_file: TemplateFile
    :param template_file: The template to be "applied" with the
    various instance attributes.
    """

    def _copy(value, all = True):
        print("_copy -> all = %s" % str(all))
        value = "Copy right by: " + value
        return value

    def _nl_to_br(value, extra = False):
        tobias = value + "nl_to_br"
        if extra: tobias += " extra"
        return tobias

    def _echo(*args, **kwargs):
        return str(args)

    def _same(value):
        return value

    def _url_for(*args, **kwargs):
        return self.url_for(request, *args, **kwargs)

    # assigns the top level clojure based operations that may
    # be used for the current context, this values are context
    # aware and may be used for the current request
    template_file.assign("copy", _copy)
    template_file.assign("same", _same)
    template_file.assign("url_for", _url_for)
    template_file.assign("echo", _echo)
    template_file.assign("nl_to_br", _nl_to_br)

    # assigns the various instance components to the template file:
    # the instance itself, the associated system and the associated plugin
    template_file.assign("self", self)
    template_file.assign("system_s", self.system)
    template_file.assign("plugin_s", self.plugin)