code: def get_sample_ids(data: DataFrame) -> List[str]:
      """
      Extracts sample IDs from a variant DataFrame, such as one read from PLINK files.
  
      Requires that the sample IDs:
  
          - Are in ``genotype.sampleId``
          - Are the same across all the variant rows
          - Are a list of strings
          - Are non-empty
          - Are unique
  
      Args:
          data : The variant DataFrame containing sample IDs
  
      Returns:
          list of sample ID strings
      """
      assert check_argument_types()
      distinct_sample_id_sets = data.selectExpr(
          "genotypes.sampleId as sampleIds"
      ).distinct()
      if distinct_sample_id_sets.count() != 1:
          raise Exception(
              "Each row must have the same set of sample IDs."
          )
      sample_ids = distinct_sample_id_sets.head().sampleIds
      __validate_sample_ids(sample_ids)
      assert check_return_type(sample_ids)
      return sample_ids
  
file_path: glow/python/glow/wgr/wgr_functions.py
imports: from glow import glow
  import pandas
  import numpy
  from pyspark import SparkContext
  from pyspark.sql import DataFrame, Row, SparkSession, SQLContext
  from typeguard import check_argument_types, check_return_type
  from typing import Any, Dict, List
  from nptyping import Float, NDArray
  from .ridge_reduction import RidgeReduction
  from .ridge_regression import RidgeRegression
  from .logistic_ridge_regression import LogisticRidgeRegression
label_desc: Use image node_id 4 for calling a global function with example usage: get_sample_ids(data) and returns: sample_ids