code: def cftime_to_timestamp(date, time_unit='us'):
      
      import cftime
      utime = cftime.utime('microseconds since 1970-01-01 00:00:00')
      if time_unit == 'us':
          tscale = 1
      else:
          tscale = (np.timedelta64(1, 'us')/np.timedelta64(1, time_unit))
      return utime.date2num(date)*tscale
docs: Converts cftime to timestamp since epoch in milliseconds
  
      Non-standard calendars (e.g. Julian or no leap calendars)
      are converted to standard Gregorian calendar. This can cause
      extra space to be added for dates that don't exist in the original
      calendar. In order to handle these dates correctly a custom bokeh
      model with support for other calendars would have to be defined.
  
      Args:
          date: cftime datetime object (or array)
  
      Returns:
          time_unit since 1970-01-01 00:00:00