code: def date_range(start, end, length, time_unit='us'):
      
      step = (1./compute_density(start, end, length, time_unit))
      if pd and isinstance(start, pd.Timestamp):
          start = start.to_datetime64()
      step = np.timedelta64(int(round(step)), time_unit)
      return start+step/2.+np.arange(length)*step
docs: Computes a date range given a start date, end date and the number
      of samples.