def METHOD_NAME(self, model_resource, path):
    model_resource.setLocation(path)
    op = smtk.session.polygon.Write.create()
    op.parameters().associate(model_resource)
    result = op.operate()
    outcome = result.findInt('outcome').value()
    self.assertEqual(outcome, OP_SUCCEEDED,
                     'Write operation failed w/outcome {}'.format(outcome))
    # Sanity check
    self.assertTrue(os.path.isfile(path))
    print('Wrote file', path)