def METHOD_NAME(self):
    resource = self.get_by_name(self.data['name'])
    if self.state == 'present':
        return self._present(resource)
    else:
        return self.resource_absent(resource)