code: def p2th_wif(self) -> Optional[str]:
          '''P2TH privkey in WIF format'''
  
          if self.id:
              return Kutil(network=self.network,
                           privkey=bytearray.fromhex(self.id)).wif
          else:
              return Nonf p2th_wif(self) -> Optional[str]:
          '''P2TH privkey in WIF format'''
  
          if self.id:
              return Kutil(network=self.network,
                           privkey=bytearray.fromhex(self.id)).wif
          else:
              return None
docs: P2TH privkey in WIF format