code: def getreference(self, validate=True):
          
  
          if self.offset is None: return None #nothing to test
          if self.ref:
              ref = self.doc[self.ref]
          else:
              ref = self.finddefaultreference()
  
          if not ref:
              raise UnresolvableTextContent("Default reference for phonetic content not found!")
          elif not ref.hasphon(self.cls):
              raise UnresolvableTextContent("Reference has no such phonetic content (class=" + self.cls+")")
          elif validate and self.phon() != ref.textcontent(self.cls).phon()[self.offset:self.offset+len(self.data[0])]:
              raise UnresolvableTextContent("Reference (class=" + self.cls+") found but no phonetic match at specified offset ("+str(self.offset)+")! Expected '" + self.text() + "', got '" + ref.textcontent(self.cls).text()[self.offset:self.offset+len(self.data[0])] +"'")
          else:
              #finally, we made it!
              return ref
docs: Return and validate the Phonetic Content's reference. Raises UnresolvableTextContent when invalid