code: def test_haploid(self):
      c_haploid = Call([2], phased=True)
      self.assertEqual(c_haploid.alleles, [2])
      self.assertEqual(c_haploid.ploidy, 1)
      self.assertTrue(c_haploid.phased)
      self.assertTrue(c_haploid.is_haploid())
      self.assertFalse(c_haploid.is_diploid())
      self.assertEqual(c_haploid.n_alt_alleles(), 1)
      self.assertTrue(c_haploid.one_hot_alleles(3) == [0, 0, 1])
      self.assertFalse(c_haploid.is_hom_ref())
      self.assertFalse(c_haploid.is_het())
      self.assertTrue(c_haploid.is_hom_var())
      self.assertTrue(c_haploid.is_non_ref())
      self.assertFalse(c_haploid.is_het_non_ref())
      self.assertFalse(c_haploid.is_het_ref())
  
file_path: hail/hail/python/test/hail/genetics/test_call.py
imports: import unittest
  from hail.genetics import *
  from ..helpers import *
label_desc: Use image node_id 4 for calling the Tests obj's underlying member method code with example usage: obj.test_haploid() without return types