def METHOD_NAME(
    src_ndim: int, dims: tuple[ProjExpr, ...]
) -> tuple[int, int, Any, Any, Any]:
    tgt_ndim = len(dims)
    dims_c = ffi.new(f"int32_t[{tgt_ndim}]")
    weights_c = ffi.new(f"int32_t[{tgt_ndim}]")
    offsets_c = ffi.new(f"int32_t[{tgt_ndim}]")
    for dim, coord in enumerate(dims):
        dims_c[dim] = coord.dim
        weights_c[dim] = coord.weight
        offsets_c[dim] = coord.offset
    return (src_ndim, tgt_ndim, dims_c, weights_c, offsets_c)