code: def of_pipeline(output_grid=1, hint_grid=1, use_temporal_hints=False):
      if hint_grid is not None:
          seq, hint = fn.external_source(
              lambda info: load_frames(info, hint_grid),
              layout=["FHWC", "FHWC"],
              batch=False,
              num_outputs=2,
          )
  
          of = fn.optical_flow(
              seq.gpu(),
              hint.gpu(),
              device="gpu",
              output_grid=output_grid,
              hint_grid=hint_grid,
              enable_temporal_hints=use_temporal_hints,
          )
      else:
          seq = fn.external_source(
              lambda info: load_frames(info, hint_grid),
              layout="FHWC",
              batch=False,
          )
          of = fn.optical_flow(
              seq.gpu(),
              device="gpu",
              output_grid=output_grid,
              enable_temporal_hints=use_temporal_hints,
          )
      return seq, of
  
imports: import os
  import numpy
  import platform
  import random
  import cv2
  from nvidia.dali.pipeline import pipeline_def
  from nvidia.dali import fn, types
  from test_utils import get_dali_extra_path, get_arch
  from nose_utils import raises, assert_raises
  from nose import SkipTest
label_desc: Use image node_id 4 for calling a global function with example usage: of_pipeline(output_grid, hint_grid, use_temporal_hints) and returns: seq,  of