code: def require_alleles_field(dataset, method):
      if "alleles" not in dataset.row:
          raise ValueError(
              f"Method '{method}' requires a field 'alleles' (type 'array<str>')\n"
          )
      if dataset.alleles.dtype != tarray(tstr):
          raise ValueError(
              f"Method '{method}' requires a field 'alleles' (type 'array<str>')\n"
              f"  Found:\n"
              f"    'alleles': {dataset.alleles.dtype}"
          )
  
imports: from typing import Union
  import hail
  from hail.expr import Expression, expr_numeric, expr_array, expr_interval, expr_any, construct_expr, construct_variable
  from hail.expr.types import tlocus, tarray, tstr, tstruct, ttuple
  from hail.matrixtable import MatrixTable
  from hail.table import Table
  from hail.typecheck import typecheck, nullable, func_spec, oneof
  from hail.utils import Interval, Struct, new_temp_file, deduplicate
  from hail.utils.misc import plural
  from hail.utils.java import Env, info
  from hail import ir
label_desc: Use image node_id 5 for calling a global function with example usage: require_alleles_field(dataset, method) without return types