code: def from_matrix_table(
      mt: MatrixTable, include_sample_ids: bool = True
  ) -> DataFrame:
      """
      Converts a Hail MatrixTable to a Glow DataFrame. The variant fields are derived from the Hail MatrixTable
      row fields. The sample IDs are derived from the Hail MatrixTable column fields. All other genotype fields are
      derived from the Hail MatrixTable entry fields.
  
      Requires that the MatrixTable rows contain locus and alleles fields.
  
      Args:
          mt : The Hail MatrixTable to convert
          include_sample_ids : If true (default), include sample IDs in the Glow DataFrame.
                               Sample names increase the size of each row, both in memory and on storage.
  
      Returns:
          Glow DataFrame converted from the MatrixTable.
      """
  
      assert check_argument_types()
  
      # Ensure that dataset rows contain locus and alleles
      _require_row_variant_w_struct_locus(mt)
  
      glow_compatible_df = (
          mt.localize_entries("entries")
          .to_spark()
          .select(
              *_get_base_cols(mt.rows().row),
              *_get_other_cols(mt.rows().row),
              _get_genotypes_col(
                  mt.entry,
                  _get_sample_ids(mt.col_key, include_sample_ids),
              ),
          )
      )
      assert check_return_type(glow_compatible_df)
      return glow_compatible_df
  
file_path: glow/python/glow/hail/functions.py
imports: import hail
  from hail import MatrixTable
  from hail.expr.expressions.typed_expressions import StructExpression
  from hail.expr.types import tarray, tbool, tcall, tfloat64, tint, tlocus, tset, tstr, tstruct
  from pyspark.sql import Column, DataFrame
  import pyspark.sql.functions
  from typing import List, NoReturn, Optional
  from typeguard import check_argument_types, check_return_type
label_desc: Use image node_id 6 for calling a global function with example usage: from_matrix_table(mt, include_sample_ids) and returns: glow_compatible_df