def METHOD_NAME(self, context, test, model):
    assign_token = None
    if len(model.sections) == 1:
        section = next(iter(model.sections))
        body = getattr(section, "body", None)
        if body is not None and len(body) == 1:
            t = next(iter(body))
            if t.__class__.__name__ == "TestCase":
                body = getattr(t, "body", None)
                if len(body) == 1:
                    line = next(iter(body))
                    if line.__class__.__name__ == "KeywordCall":
                        if not line.keyword:
                            for token in line.tokens:
                                if token.type == token.ASSIGN:
                                    assign_token = token
                                    break
                    elif line.__class__.__name__ == "EmptyLine":
                        for token in line.tokens:
                            if token.type == token.ASSIGN:
                                assign_token = token
                                break
    if assign_token:
        return context.namespace.variables.replace_string(str(token))
    from robot import version
    IS_ROBOT_4_ONWARDS = not version.get_version().startswith("3.")
    if IS_ROBOT_4_ONWARDS:
        if len(test.body) == 1:
            # Unfortunately bodyrunner.BodyRunner.run doesn't return the
            # value, so, we have to do it ourselves.
            from robot.errors import ExecutionPassed
            from robot.errors import ExecutionFailed
            from robot.errors import ExecutionFailures
            errors = []
            passed = None
            step = next(iter(test.body))
            ret = None
            try:
                ret = step.run(context, True, False)
            except ExecutionPassed as exception:
                exception.set_earlier_failures(errors)
                passed = exception
            except ExecutionFailed as exception:
                errors.extend(exception.get_errors())
            if passed:
                raise passed
            if errors:
                raise ExecutionFailures(errors)
            return ret
        from robot.running.bodyrunner import BodyRunner  # noqa
        BodyRunner(context, templated=False).run(test.body)
        return None
    else:
        from robot.running.steprunner import StepRunner  # noqa
        StepRunner(context, False).run_steps(test.keywords.normal)
        return None