def make_overload_attribute_template(typ, attr, overload_func, inline='never',
                                     prefer_literal=False,
                                     base=_OverloadAttributeTemplate,
                                     **kwargs):
    """
    Make a template class for attribute *attr* of *typ* overloaded by
    *overload_func*.
    """
    assert isinstance(typ, types.Type) or issubclass(typ, types.Type)
    name = "OverloadAttributeTemplate_%s_%s" % (typ, attr)
    # Note the implementation cache is subclass-specific
    dct = dict(key=typ, _attr=attr, _impl_cache={},
               _inline=staticmethod(InlineOptions(inline)),
               _inline_overloads={},
               _overload_func=staticmethod(overload_func),
               prefer_literal=prefer_literal,
               metadata=kwargs,
               )
    obj = type(base)(name, (base,), dct)
    return obj

    Make a template class for attribute *attr* of *typ* overloaded by
    *overload_func*.
    
numba/core/typing/templates.py