def xpath(self):
        """Return an xpath for this object

        Xpath in the form: parent's xpath + this object's xpath + entry or member if applicable.
        """
        if self.parent is None:
            parent_xpath = ""
        elif issubclass(type(self.parent), PanDevice):
            if self.ROOT == Root.DEVICE:
                parent_xpath = self.parent.xpath_device()
            elif self.ROOT == Root.VSYS:
                parent_xpath = self.parent.xpath_vsys()
            elif self.ROOT == Root.MGTCONFIG:
                parent_xpath = self.parent.xpath_mgtconfig()
            else:
                parent_xpath = self.parent.xpath()
        else:
            parent_xpath = self.parent.xpath()
        suffix = "" if self.SUFFIX is None else self.SUFFIX % self.name
        result = str(parent_xpath + self.XPATH + suffix)
        return result
dataset/ETHPy150Open PaloAltoNetworks/SplunkforPaloAltoNetworks/bin/lib/pandevice/pandevice/base.py/PanObject.xpath/original