code: def test_data_generator_getters_setters(data_gen, attr):
      assert hasattr(data_gen, attr)
      val = getattr(data_gen, attr)
      setattr(data_gen, attr, val)
      assert getattr(data_gen, attr) == val
  
imports: import copy
  import pytest
  import keras
  import matchzoo
label_desc: Use image node_id 2 for calling a global function with example usage: test_data_generator_getters_setters(data_gen, attr) without return types