def get_resource_attribute(self, attr):
        """Gets the resource attribute if available

        :param attr: Name of the attribute
        :return: Value of the attribute, if set in the resource. None otherwise
        """
        if attr not in self.resource_attributes:
            raise KeyError("%s is not in resource attributes" % attr)

        return self.resource_attributes[attr]
def get_resource_attribute ( self , attr ) : if attr not in self . resource_attributes : raise KeyError ( "%s is not in resource attributes" % attr ) return self . resource_attributes [ attr ]
Gets the resource attribute if available

        :param attr: Name of the attribute
        :return: Value of the attribute, if set in the resource. None otherwise