@classmethod
def get_renderer(cls, name=None, kind=None):
    """
        Using the name if you've asked for it specifically, or attempting to
        guess the appropriate renderer based on the kind of measurement, this
        will return a Renderer subclass or None if nothing can be found.
        """
    renderer = None
    if name:
        renderer = cls.get_renderer_by_name(name)
    if not renderer and kind:
        renderer = cls.get_renderer_by_kind(kind)
    if kind:
        cls._test_renderer_accepts_kind(renderer, kind)
    return renderer
