code: def check_downsampled_term(self, term):
      #       June 2014
      # Mo Tu We Th Fr Sa Su
      #                    1
      #  2  3  4  5  6  7  8
      #  9 10 11 12 13 14 15
      # 16 17 18 19 20 21 22
      # 23 24 25 26 27 28 29
      # 30
      all_sessions = self.all_sessions
      compute_dates = all_sessions[
          all_sessions.slice_indexer("2014-06-05", "2015-01-06")
      ]
      start_date, end_date = compute_dates[[0, -1]]
  
      pipe = Pipeline(
          {
              "year": term.downsample(frequency="year_start"),
              "quarter": term.downsample(frequency="quarter_start"),
              "month": term.downsample(frequency="month_start"),
              "week": term.downsample(frequency="week_start"),
          }
      )
  
      # Raw values for term, computed each day from 2014 to the end of the
      # target period.
      raw_term_results = self.run_pipeline(
          Pipeline({"term": term}),
          start_date=pd.Timestamp("2014-01-02", tz="UTC"),
          end_date=pd.Timestamp("2015-01-06", tz="UTC"),
      )["term"].unstack()
  
      expected_results = {
          "year": (
              raw_term_results.groupby(pd.TimeGrouper("AS"))
              .first()
              .reindex(compute_dates, method="ffill")
          ),
          "quarter": (
              raw_term_results.groupby(pd.TimeGrouper("QS"))
              .first()
              .reindex(compute_dates, method="ffill")
          ),
          "month": (
              raw_term_results.groupby(pd.TimeGrouper("MS"))
              .first()
              .reindex(compute_dates, method="ffill")
          ),
          "week": (
              raw_term_results.groupby(
                  pd.TimeGrouper("W", label="left")
              )
              .first()
              .reindex(compute_dates, method="ffill")
          ),
      }
  
      results = self.run_pipeline(pipe, start_date, end_date)
  
      for frequency in expected_results:
          result = results[frequency].unstack()
          expected = expected_results[frequency]
          assert_frame_equal(result, 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 4 for calling the DownsampledPipelineTestCase obj's underlying member method code with example usage: obj.check_downsampled_term(term) without return types