code: def _var(
      chrom="1",
      start=5,
      end=None,
      ref=None,
      alt=None,
      qual=50,
      genotype=None,
      likelihoods=None,
      sample_name="NA12878",
  ):
      """Creates a Variant record for testing.
  
      Args:
        chrom: reference name for this variant
        start: start position on the contig
        end: end position on the contig
        ref: reference base(s)
        alt: list(str). alternate base(s)
        qual: PHRED scaled detection probability
        genotype: list of integers corresponding to the called genotype
        likelihoods: genotype likelihoods for this variant
        sample_name: sample name for the single call in the variant
  
      Returns:
        A Variant record created with the specified arguments.
  
      Raises:
        ValueError: Both ref and end are specified, and are inconsistent.
      """
      if ref is None and end is None:
          ref = "A"
      elif ref is None:
          ref = "A" * (end - start)
      elif (
          ref is not None
          and end is not None
          and end != start + len(ref)
      ):
          raise ValueError("Inconsistent end and reference allele.")
  
      if alt is None:
          alt = ["C"]
      if genotype is None:
          genotype = [0, 1]
      if likelihoods is None:
          likelihoods = [-1.0, -0.0506099933550872, -2.0]
      return test_utils.make_variant(
          chrom=chrom,
          start=start,
          alleles=[ref] + alt,
          qual=qual,
          filters=None,
          gt=genotype,
          gls=likelihoods,
          sample_name=sample_name,
      )
  
imports: import types
  from absl import flags
  from absl.testing import absltest
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  from third_party.nucleus.testing import test_utils
  from deepvariant import haplotypes
label_desc: Use image node_id 1 for calling a global function with example usage: _var(chrom, start, end, ref, alt, qual, genotype, likelihoods, sample_name) and returns: test_utils