code: def normalize_variant(
      contigName: Union[Column, str],
      start: Union[Column, str],
      end: Union[Column, str],
      refAllele: Union[Column, str],
      altAlleles: Union[Column, str],
      refGenomePathString: str,
  ) -> Column:
      """
      Normalizes the variant with a behavior similar to vt normalize or bcftools norm.
      Creates a StructType column including the normalized ``start``, ``end``, ``referenceAllele`` and
      ``alternateAlleles`` fields (whether they are changed or unchanged as the result of
      normalization) as well as a StructType field called ``normalizationStatus`` that
      contains the following fields:
  
         ``changed``: A boolean field indicating whether the variant data was changed as a result of normalization
  
         ``errorMessage``: An error message in case the attempt at normalizing the row hit an error. In this case, the ``changed`` field will be set to ``false``. If no errors occur, this field will be ``null``.
  
      In case of an error, the ``start``, ``end``, ``referenceAllele`` and ``alternateAlleles`` fields in the generated struct will be ``null``.
  
      Added in version 0.3.0.
  
      Examples:
          >>> df = spark.read.format('vcf').load('test-data/variantsplitternormalizer-test/test_left_align_hg38_altered.vcf')
          >>> ref_genome = 'test-data/variantsplitternormalizer-test/Homo_sapiens_assembly38.20.21_altered.fasta'
          >>> df.select('contigName', 'start', 'end', 'referenceAllele', 'alternateAlleles').head()
          Row(contigName='chr20', start=400, end=401, referenceAllele='G', alternateAlleles=['GATCTTCCCTCTTTTCTAATATAAACACATAAAGCTCTGTTTCCTTCTAGGTAACTGGTTTGAG'])
          >>> normalized_df = df.select('contigName', glow.expand_struct(glow.normalize_variant('contigName', 'start', 'end', 'referenceAllele', 'alternateAlleles', ref_genome)))
          >>> normalized_df.head()
          Row(contigName='chr20', start=268, end=269, referenceAllele='A', alternateAlleles=['ATTTGAGATCTTCCCTCTTTTCTAATATAAACACATAAAGCTCTGTTTCCTTCTAGGTAACTGG'], normalizationStatus=Row(changed=True, errorMessage=None))
  
      Args:
          contigName : The current contig name
          start : The current start
          end : The current end
          refAllele : The current reference allele
          altAlleles : The current array of alternate alleles
          refGenomePathString : A path to the reference genome ``.fasta`` file. The ``.fasta`` file must be accompanied with a ``.fai`` index file in the same folder.
  
      Returns:
          A struct as explained above
      """
      assert check_argument_types()
      output = Column(
          sc()._jvm.io.projectglow.functions.normalize_variant(
              _to_java_column(contigName),
              _to_java_column(start),
              _to_java_column(end),
              _to_java_column(refAllele),
              _to_java_column(altAlleles),
              refGenomePathString,
          )
      )
      assert check_return_type(output)
      return output
  
imports: from pyspark import SparkContext
  from pyspark.sql.column import Column, _to_java_column, _to_seq
  from typeguard import check_argument_types, check_return_type
  from typing import Union
label_desc: Use image node_id 12 for calling a global function with example usage: normalize_variant(contigName, start, end, refAllele, altAlleles, refGenomePathString) and returns: output