def METHOD_NAME(plugins, # pylint: disable=too-many-arguments
                           view_name,
                           user_profile=None,
                           submission=None,
                           exercise=None,
                           course_instance=None,
                           course=None, # pylint: disable=unused-argument
                           course_module=None, # pylint: disable=unused-argument
                           category=None): # pylint: disable=unused-argument
    try:
        if view_name == "submission":
            context = {
                "user_profile": user_profile,
                "course_instance": course_instance,
                "exercise": exercise,
                "submission": submission,
            }
        elif view_name == "exercise":
            context = {
                "user_profile": user_profile,
                "course_instance": course_instance,
                "exercise": exercise,
            }
        #elif view_name == "course_instance":
        else:
            context = {
                "user_profile": user_profile,
                "course_instance": course_instance,
            }
        #else:
        #    raise ValueError(view_name + " is not supported for plugins.")
        plugins = plugins.filter(views__contains=view_name)
        renderers = []
        for p in plugins:
            if hasattr(p, "get_renderer_class"):
                renderers.append(p.get_renderer_class()(p, view_name, context))
            else:
                renderers.append(p)
        return renderers
    except Exception:
        # If anything goes wrong, just return an empty list so that this isn't
        # a show-stopper for the A+ core functionality.
        logger.exception("Failed to create plugin renderers.")
        return []