code: def zip_with_index_field(array, idx_field_name):
      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.InsertFields(
                  ir.Ref(elt, array.typ.element_type),
                  [
                      (
                          idx_field_name,
                          ir.Cast(
                              ir.Ref(inner_row_uid, tint32), tint64
                          ),
                      )
                  ],
                  None,
              ),
              "TakeMinLength",
          )
      )
  
file_path: hail/hail/python/hail/ir/utils.py
imports: from typing import Optional, List, Any, Tuple
  import hail
  from hail.utils.java import Env
  from hail.expr.types import tint32, tint64
label_desc: Use image node_id 6 for calling a global function with example usage: zip_with_index_field(array, idx_field_name) and returns: ir