code: def test_plink(spark):
      input_base = (
          "test-data/plink/five-samples-five-variants/bed-bim-fam/test"
      )
      # Do not recode contigs (eg. 23 -> X)
      hail_df = functions.from_matrix_table(
          hl.import_plink(
              bed=input_base + ".bed",
              bim=input_base + ".bim",
              fam=input_base + ".fam",
              reference_genome=None,
              contig_recoding={},
          )
      )
  
      # Hail does not set the genotype if it is missing; the Glow PLINK reader sets the calls to (-1, -1)
      # Hail sets the genotype phased=False when reading from PLINK if the genotype is present;
      # the Glow PLINK reader does not as it is always false
      glow_df = (
          spark.read.format("plink")
          .option("mergeFidIid", "false")
          .load(input_base + ".bed")
      )
      _compare_struct_types(
          hail_df.schema, glow_df.schema, ignore_fields=["phased"]
      )
      matching_glow_df = glow_df.withColumn(
          "genotypes",
          fx.expr(
              "transform(genotypes, gt -> named_struct('sampleId', gt.sampleId, 'calls', ifnull(gt.calls, array(-1,-1)), 'phased', if(gt.calls = array(-1, -1), null, false)))"
          ),
      )
      matching_hail_df = hail_df.select(*glow_df.schema.names)
      assert matching_hail_df.subtract(matching_glow_df).count() == 0
      assert matching_glow_df.subtract(matching_hail_df).count() == 0
  
file_path: glow/python/glow/hail/tests/test_from_matrix_table.py
imports: from glow.hail import functions
  import hail
  from pyspark.sql import functions
  from pyspark.sql.types import ArrayType, StructType
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_plink(spark) without return types