code: def check_lookup_table_vs_python_op(
      device,
      batch_size,
      layout,
      shape,
      dtype,
      dictionary_type,
      default_value,
  ):
      eii1 = RandomlyShapedDataIterator(batch_size, max_shape=shape)
      eii2 = RandomlyShapedDataIterator(batch_size, max_shape=shape)
      if dictionary_type == "empty":
          dictionary = {}
      elif dictionary_type == "random":
          dictionary = {k: random.random() for k in range(256)}
      elif dictionary_type == "small":
          dictionary = {0: 0.1, 200: 0.99}
      else:
          assert False
      compare_pipelines(
          LookupTablePipeline(
              device,
              batch_size,
              iter(eii1),
              data_shape=shape,
              data_layout=layout,
              dtype=dtype,
              dictionary=dictionary,
              default_value=default_value,
          ),
          LookupTablePythonOpPipeline(
              lookup_func,
              batch_size,
              iter(eii2),
              data_shape=shape,
              data_layout=layout,
              dtype=dtype,
              dictionary=dictionary,
              default_value=default_value,
          ),
          batch_size=batch_size,
          N_iterations=3,
      )
  
imports: import numpy
  import random
  from nvidia.dali import fn, types, ops, pipeline_def
  from nvidia.dali.pipeline import Pipeline
  from test_utils import RandomlyShapedDataIterator
  from test_utils import compare_pipelines
  from nose2.tools import params
label_desc: Use image node_id 2 for calling a global function with example usage: check_lookup_table_vs_python_op(device, batch_size, layout, shape, dtype, dictionary_type, default_value) without return types