def _list_new(typingctx, itemty, allocated):
    """Wrap numba_list_new.

    Allocate a new list object with zero capacity.

    Parameters
    ----------
    itemty: Type
        Type of the items
    allocated: int
        number of items to pre-allocate

    """
    resty = types.voidptr
    sig = resty(itemty, allocated)

    def codegen(context, builder, sig, args):
        error_handler = ErrorHandler(context)
        return _list_new_codegen(context,
                                 builder,
                                 itemty.instance_type,
                                 args[1],
                                 error_handler,
                                 )

    return sig, codegen
Wrap numba_list_new.

    Allocate a new list object with zero capacity.

    Parameters
    ----------
    itemty: Type
        Type of the items
    allocated: int
        number of items to pre-allocate

    
numba/typed/listobject.py