def METHOD_NAME(state, name="dpex_kernel_typed"):
    """Returns the typed part of the nopython pipeline"""
    pm = PassManager(name)
    # typing
    pm.add_pass(NopythonTypeInference, "nopython frontend")
    # Annotate only once legalized
    pm.add_pass(AnnotateTypes, "annotate types")
    # strip phis
    pm.add_pass(PreLowerStripPhis, "remove phis nodes")
    # optimization
    if not state.flags.no_rewrites:
        pm.add_pass(NopythonRewrites, "nopython rewrites")
    pm.finalize()
    return pm