def METHOD_NAME(self, resource, filename):
    """Write smtk format and read back"""
    path = os.path.join(smtk.testing.TEMP_DIR, filename)
    self.filenames.append(path)
    resource.setLocation(path)
    # Write as smtk
    write_op = self.op_manager.createOperation(
        'smtk::operation::WriteResource')
    write_params = write_op.parameters()
    write_params.associate(resource)
    write_result = write_op.operate()
    # Read back
    read_op = self.op_manager.createOperation(
        'smtk::operation::ReadResource')
    read_params = read_op.parameters()
    file_item = read_params.findFile('filename')
    file_item.setValue(path)
    read_result = read_op.operate()
    # Also check log for errors
    if read_op.log().hasErrors():
        print('READ LOG:')
        print(read_op.log().convertToString())
    self.assertFalse(read_op.log().hasErrors())
    resource_item = read_result.findResource("resource")
    test_resource = resource_item.value()
    self.assertIsNotNone(test_resource)
    return test_resource