code: def time2num(tm):
      """
      Converts the hour/minute/second/microsecond part of tm (datetime.datetime
      or time) to a num
      """
      num = (
          tm.hour / HOURS_PER_DAY
          + tm.minute / MINUTES_PER_DAY
          + tm.second / SECONDS_PER_DAY
          + tm.microsecond / MUSECONDS_PER_DAY
      )
  
      return num
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import datetime
  import math
  import time
  from .py3 import string_types
label_desc: Use image node_id 7 for calling a global function with example usage: time2num(tm) and returns: num