code: def test_complex_outputs(num_gen):
      class DataClass(object):
          def __init__(self, a, b):
              self.a = a
              self.b = b
  
      def f(n, obj):
          obj.a = np.int32(0)
          obj.b = np.int32(0)
          if n > 0:
              obj.a = -n
          else:
              obj.b = 2 * n
          return obj.a, obj.b
  
      generic_execute(
          lambda input: f(input, DataClass(np.int32(0), np.int32(0))),
          [num_gen],
      )
  
imports: from nvidia.dali.pipeline import pipeline_def, experimental
  import nvidia.dali.fn
  import nvidia.dali.types
  from nvidia.dali.types import SampleInfo
  from nvidia.dali import _conditionals
  from nvidia.dali.data_node import DataNode
  import numpy
  import os
  from test_utils import check_batch, compare_pipelines
  from nose_utils import assert_raises
  from test_utils import get_dali_extra_path
  from nose2.tools import params
  import itertools
label_desc: Use image node_id 4 for calling a global function with example usage: test_complex_outputs(num_gen) and returns: obj,  obj