code: def flow_to_color(flow_uv, clip_flow=None, convert_to_bgr=False):
      """
      Expects a two dimensional flow image of shape [H,W,2]
      According to the C++ source code of Daniel Scharstein
      According to the Matlab source code of Deqing Sun
      :param flow_uv: np.ndarray of shape [H,W,2]
      :param clip_flow: float, maximum clipping value for flow
      :return:
      """
  
      assert flow_uv.ndim == 3, "input flow must have three dimensions"
      assert flow_uv.shape[2] == 2, "input flow must have shape [H,W,2]"
  
      if clip_flow is not None:
          flow_uv = np.clip(flow_uv, 0, clip_flow)
  
      u = flow_uv[:, :, 0]
      v = flow_uv[:, :, 1]
  
      rad = np.sqrt(np.square(u) + np.square(v))
      rad_max = np.max(rad)
  
      epsilon = 1e-5
      u = u / (rad_max + epsilon)
      v = v / (rad_max + epsilon)
  
      return flow_compute_color(u, v, convert_to_bgr)
  
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 7 for calling a global function with example usage: flow_to_color(flow_uv, clip_flow, convert_to_bgr) and returns: flow_compute_color