def METHOD_NAME(array):
    import hail.ir.ir as ir
    elt = Env.get_uid()
    inner_row_uid = Env.get_uid()
    iota = ir.StreamIota(ir.I32(0), ir.I32(1))
    return ir.toArray(ir.StreamZip(
        [ir.toStream(array), iota],
        [elt, inner_row_uid],
        ir.MakeTuple((ir.Ref(elt, array.typ.element_type), ir.Ref(inner_row_uid, tint32))),
        'TakeMinLength'))