code: def to_epoch(t_str):
      """
      Covert a timestamp string to an epoch number.
      :param str t_str: a timestamp string.
      :return int: epoch number of the timestamp.
      """
      try:
          t = float(t_str)
          return t
      except ValueError:
          for format in constants.TIMESTAMP_STR_FORMATS:
              try:
                  t = datetime.datetime.strptime(t_str, format)
                  return float(
                      time.mktime(t.utctimetuple()) * 1000.0
                      + t.microsecond / 1000.0
                  )
              except ValueError:
                  pass
      raise exceptions.InvalidDataFormat
  
file_path: luminol/src/luminol/utils.py
imports: import csv
  import datetime
  import time
  from luminol import constants, exceptions
  from scipy.stats import binom
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: to_epoch(t_str) and returns: t, float