code: def timecds2datetime(tcds):
      """Convert time_cds-variables to datetime-object.
  
      Works both with a dictionary and a numpy record_array.
      """
      days = int(tcds["Days"].item())
      milliseconds = int(tcds["Milliseconds"].item())
      try:
          microseconds = int(tcds["Microseconds"].item())
      except (KeyError, ValueError):
          microseconds = 0
      try:
          microseconds += int(tcds["Nanoseconds"].item()) / 1000.0
      except (KeyError, ValueError):
          pass
  
      reference = datetime(1958, 1, 1)
      delta = timedelta(
          days=days,
          milliseconds=milliseconds,
          microseconds=microseconds,
      )
  
      return reference + delta
  
imports: from datetime import datetime, timedelta
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: timecds2datetime(tcds) and returns: unknown