human
I wrote the below code

    from .typing.templates import AttributeTemplate
    from .datamodel import default_manager
    from .datamodel.models import StructModel
    from .targets.imputils import impl_ret_borrowed
    from . import cgutils
    if ((not isinstance(typeclass, type)) or (not issubclass(typeclass, types.Type))):
        raise TypeError(('typeclass    should    be    a    Type    subclass,    got    %s' % (typeclass,)))
    def get_attr_fe_type(typ):
        '\n                                Get    the    Numba    type    of    member    *struct_attr*    in    *typ*.\n                                '
        model = default_manager.lookup(typ)
        if (not isinstance(model, StructModel)):
            raise TypeError(('make_struct_attribute_wrapper()    needs    a    type    with    a    StructModel,    but    got    %s' % (model,)))
        return model.get_member_fe_type(struct_attr)
    @infer_getattr
    class StructAttribute(AttributeTemplate, ):
        key = typeclass
        def generic_resolve(self, typ, attr):
            if (attr == python_attr):
                return get_attr_fe_type(typ)
    @lower_getattr(typeclass, python_attr)
    def struct_getattr_impl(context, builder, typ, val):
        val = cgutils.create_struct_proxy(typ)(context, builder, value=val)
        attrty = get_attr_fe_type(typ)
        attrval = getattr(val, struct_attr)
        return impl_ret_borrowed(context, builder, attrty, attrval)

What's a good function header?
assistant
#Here's a good function header.

def make_attribute_wrapper(typeclass, struct_attr, python_attr):