code: def time_to_width(value, end):
      # map a value from (0,end) to (0,1000)
      r = (float(value) / float(end)) * 1000.0
      return int(r)
  
file_path: cudf/cpp/scripts/sort_ninja_log.py
imports: import argparse
  import os
  import sys
  import xml.etree.ElementTree
  from pathlib import Path
  from xml.dom import minidom
label_desc: Use image node_id 3 for calling a global function with example usage: time_to_width(value, end) and returns: int