code: def test_python_function():
      pipe = dali.pipeline.Pipeline(
          3, 1, 0, exec_async=False, exec_pipelined=False
      )
      with pipe:
  
          def func(inp):
              ret = [x * x for x in inp]
              return ret
  
          out_cpu = fn.python_function(
              np.array([[1, 2], [3, 4]]),
              function=func,
              batch_processing=True,
          )
          pipe.set_outputs(out_cpu)
      pipe.build()
      o = pipe.run()
      assert np.array_equal(o[0].at(0), np.array([[1, 4], [9, 16]]))
  
file_path: DALI/dali/test/python/operator_1/test_input_promotion.py
imports: import nvidia.dali
  import nvidia.dali.fn
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: test_python_function() and returns: ret