code: def write_variant_datasets(
      vdss,
      paths,
      *,
      overwrite=False,
      stage_locally=False,
      codec_spec=None,
  ):
      """Write many `vdses` to their corresponding path in `paths`."""
      ref_writer = ir.MatrixNativeMultiWriter(
          [f"{p}/reference_data" for p in paths],
          overwrite,
          stage_locally,
          codec_spec,
      )
      var_writer = ir.MatrixNativeMultiWriter(
          [f"{p}/variant_data" for p in paths],
          overwrite,
          stage_locally,
          codec_spec,
      )
      Env.backend().execute(
          ir.MatrixMultiWrite(
              [vds.reference_data._mir for vds in vdss], ref_writer
          )
      )
      Env.backend().execute(
          ir.MatrixMultiWrite(
              [vds.variant_data._mir for vds in vdss], var_writer
          )
      )
  
imports: from typing import Sequence
  import hail
  from hail import ir
  from hail.expr import expr_any, expr_array, expr_interval, expr_locus, expr_str, expr_bool
  from hail.matrixtable import MatrixTable
  from hail.methods.misc import require_first_key_field_locus
  from hail.table import Table
  from hail.typecheck import sequenceof, typecheck, nullable, oneof, enumeration, func_spec, dictof
  from hail.utils.java import Env, info, warning
  from hail.utils.misc import divide_null, new_temp_file, wrap_to_list
  from hail.vds.variant_dataset import VariantDataset
label_desc: Use image node_id 1 for calling a global function with example usage: write_variant_datasets(vdss, paths) without return types