code: def test_errors_on_bad_downsample_frequency(self):
      f = NDaysAgoFactor(window_length=3)
      with self.assertRaises(ValueError) as e:
          f.downsample("bad")
  
      expected = (
          "{}() expected a value in "
          "('month_start', 'quarter_start', 'week_start', 'year_start') "
          "for argument 'frequency', but got 'bad' instead."
      ).format(_qualified_name(f.downsample))
      self.assertEqual(str(e.exception), expected)
  
imports: from functools import partial
  import pandas
  from pandas.util.testing import assert_frame_equal
  from zipline.errors import NoFurtherDataError
  from zipline.pipeline import Pipeline, CustomFactor, CustomFilter, CustomClassifier, SimplePipelineEngine
  from zipline.pipeline.data.testing import TestingDataSet
  from zipline.pipeline.domain import CA_EQUITIES, EquitySessionDomain, GB_EQUITIES, US_EQUITIES
  from zipline.pipeline.factors import SimpleMovingAverage
  from zipline.pipeline.filters.smoothing import All
  from zipline.testing import ZiplineTestCase, parameter_space, ExplodingObject
  from zipline.testing.fixtures import WithTradingSessions, WithSeededRandomPipelineEngine, WithAssetFinder
  from zipline.utils.classproperty import classproperty
  from zipline.utils.input_validation import _qualified_name
  from zipline.utils.numpy_utils import int64_dtype
label_desc: Use image node_id 11 for calling the DownsampledPipelineTestCase obj's underlying member method code with example usage: obj.test_errors_on_bad_downsample_frequency() without return types