code: def test_pedigree(self):
      ped = Pedigree.read(resource("sample.fam"))
      ped.write("/tmp/sample_out.fam")
      ped2 = Pedigree.read("/tmp/sample_out.fam")
      self.assertEqual(ped, ped2)
  
      complete_trios = ped.complete_trios()
      self.assertEqual(len(complete_trios), 3)
  
      with self.assertRaises(FatalError):
          Pedigree.read(resource("duplicate_id.fam"))
  
imports: import unittest
  from hail.genetics import Trio, Pedigree
  from ..helpers import *
  from hail.utils.java import FatalError
label_desc: Use image node_id 2 for calling the Tests obj's underlying member method code with example usage: obj.test_pedigree() without return types