def render_tag(self, context, runcaseversion, user, environment, varname):
        result_kwargs = dict(
            environment=environment,
            tester=user,
            runcaseversion=runcaseversion,
            is_latest=True,
            )
        try:
            result = model.Result.objects.get(**result_kwargs)
        except model.Result.DoesNotExist:
            result = model.Result(**result_kwargs)
        except model.Result.MultipleObjectsReturned:
            # find the latest one and set it to latest, which will set all
            # others to is_latest=False
            result = model.Result.objects.filter(**result_kwargs).order_by(
                "-modified_on")[0]
            result.set_latest()
            result.save()

        context[varname] = result
        return u""
Get/construct Result and place it in context under ``varname``
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/runtests/templatetags/execution.py/ResultFor.render_tag