code: def _generate_random_data(start, end, freq, remove_freq=False):
      """Generate random series of specified window and frequency."""
      date_range = pd.date_range(start, end, freq=freq)
      date_index = pd.DatetimeIndex(date_range)
      test_series = pd.DataFrame(
          np.random.randn(date_range.shape[0]),
          index=date_index,
          columns=["value"],
      ).sort_index()
      if remove_freq:
          test_series.index.freq = None
      return test_series
  
file_path: probability/tensorflow_probability/python/sts/regularization_test.py
imports: import datetime
  from absl.testing import parameterized
  import numpy
  import pandas
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.sts import regularization
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_random_data(start, end, freq, remove_freq) and returns: test_series