def METHOD_NAME(cls, kwargs):
    target = kwargs.pop('target', 'cpu')
    try:
        return cls.target_registry[target]
    except KeyError:
        raise ValueError("Unsupported target: %s" % target)