def METHOD_NAME(self):
    resource = self.get_by_name(self.data.get('name'))
    if self.state == 'present':
        return self._present(resource)
    elif self.state == 'absent':
        return self.resource_absent(resource)