code: def filter_enumerated(shape):
      n = np.prod(shape)
      weight_sum = n * (n + 1) / 2
      return np.float32(
          1 / weight_sum * np.arange(1, n + 1).reshape(shape)
      )
  
file_path: DALI/dali/test/python/operator_2/test_filter.py
imports: import itertools
  import os
  import numpy
  from nvidia.dali import pipeline_def, fn, types
  from test_utils import get_dali_extra_path, np_type_to_dali, check_batch
  from nose2.tools import params
  from nose.plugins.attrib import attr
  from filter_test_utils import filter_baseline, filter_baseline_layout
label_desc: Use image node_id 1 for calling a global function with example usage: filter_enumerated(shape) and returns: np