def get_survey(self):
        if not hasattr(self, "_survey"):
            try:
                builder = SurveyElementBuilder()
                self._survey = \
                    builder.create_survey_element_from_json(self.json)
            except __HOLE__:
                xml = bytes(bytearray(self.xml, encoding='utf-8'))
                self._survey = create_survey_element_from_xml(xml)
        return self._survey
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/apps/viewer/models/data_dictionary.py/DataDictionary.get_survey