code: def _dt_to_epoch_ns(dt_series):
      
      index = pd.to_datetime(dt_series.values)
      if index.tzinfo is None:
          index = index.tz_localize('UTC')
      else:
          index = index.tz_convert('UTC')
      return index.view(np.int64)
docs: Convert a timeseries into an Int64Index of nanoseconds since the epoch.
  
      Parameters
      ----------
      dt_series : pd.Series
          The timeseries to convert.
  
      Returns
      -------
      idx : pd.Int64Index
          The index converted to nanoseconds since the epoch.