def make_intrinsic_template(handle, defn, name, *, prefer_literal=False,
                            kwargs=None):
    """
    Make a template class for a intrinsic handle *handle* defined by the
    function *defn*.  The *name* is used for naming the new template class.
    """
    kwargs = MappingProxyType({} if kwargs is None else kwargs)
    base = _IntrinsicTemplate
    name = "_IntrinsicTemplate_%s" % (name)
    dct = dict(key=handle, _definition_func=staticmethod(defn),
               _impl_cache={}, _overload_cache={},
               prefer_literal=prefer_literal, metadata=kwargs)
    return type(base)(name, (base,), dct)

    Make a template class for a intrinsic handle *handle* defined by the
    function *defn*.  The *name* is used for naming the new template class.
    
numba/core/typing/templates.py