code: def get_headerReference(self, type_):
          
          matching_headerReferences = self.xpath(
              "./w:headerReference[@w:type='%s']" % WD_HEADER_FOOTER.to_xml(type_)
          )
          if len(matching_headerReferences) == 0:
              return None
          return matching_headerReferences[0]
docs: Return headerReference element of *type_* or None if not present.