When using this code as is, the 'ids' variable throws an exception for not being defined. In the new API, 'ids' is no longer given as a function variable but as a variable within 'self'. close #3406