code: def test_clean_before_after(self):
      first = self._empty_ingest()
      assert_equal(
          self.clean(
              "bundle",
              before=self._ts_of_run(first),
              environ=self.environ,
          ),
          set(),
      )
      assert_equal(
          self._list_bundle(),
          {first},
          msg="directory should not have changed (before)",
      )
  
      assert_equal(
          self.clean(
              "bundle",
              after=self._ts_of_run(first),
              environ=self.environ,
          ),
          set(),
      )
      assert_equal(
          self._list_bundle(),
          {first},
          msg="directory should not have changed (after)",
      )
  
      assert_equal(
          self.clean(
              "bundle",
              before=self._ts_of_run(first) + _1_ns,
              environ=self.environ,
          ),
          {first},
      )
      assert_equal(
          self._list_bundle(),
          set(),
          msg="directory now be empty (before)",
      )
  
      second = self._empty_ingest()
      assert_equal(
          self.clean(
              "bundle",
              after=self._ts_of_run(second) - _1_ns,
              environ=self.environ,
          ),
          {second},
      )
      assert_equal(
          self._list_bundle(),
          set(),
          msg="directory now be empty (after)",
      )
  
      third = self._empty_ingest()
      fourth = self._empty_ingest()
      fifth = self._empty_ingest()
      sixth = self._empty_ingest()
  
      assert_equal(
          self._list_bundle(),
          {third, fourth, fifth, sixth},
          msg="larger set of ingestions did no happen correctly",
      )
  
      assert_equal(
          self.clean(
              "bundle",
              before=self._ts_of_run(fourth),
              after=self._ts_of_run(fifth),
              environ=self.environ,
          ),
          {third, sixth},
      )
  
      assert_equal(
          self._list_bundle(),
          {fourth, fifth},
          msg="did not strip first and last directories",
      )
  
imports: import os
  from nose_parameterized import parameterized
  import pandas
  import sqlalchemy
  from toolz import valmap
  import toolz.curried.operator
  from trading_calendars import TradingCalendar, get_calendar
  from zipline.assets import ASSET_DB_VERSION
  from zipline.assets.asset_writer import check_version_info
  from zipline.assets.synthetic import make_simple_equity_info
  from zipline.data.bundles import UnknownBundle, from_bundle_ingest_dirname, ingestions_for_bundle
  from zipline.data.bundles.core import _make_bundle_core, BadClean, to_bundle_ingest_dirname, asset_db_path
  from zipline.lib.adjustment import Float64Multiply
  from zipline.pipeline.loaders.synthetic import make_bar_data, expected_bar_values_2d
  from zipline.testing import subtest, str_to_seconds
  from zipline.testing.fixtures import WithInstanceTmpDir, ZiplineTestCase, WithDefaultDateBounds
  from zipline.testing.predicates import assert_equal, assert_false, assert_in, assert_is, assert_is_instance, assert_is_none, assert_raises, assert_true
  from zipline.utils.cache import dataframe_cache
  from zipline.utils.functional import apply
  import zipline.utils.paths
label_desc: Use image node_id 14 for calling the BundleCoreTestCase obj's underlying member method code with example usage: obj.test_clean_before_after() without return types