code: def _spot_duplicates(
      self, ohlcv_df, asset, data_frequency, threshold
  ):
      # TODO: work in progress
      series = (
          ohlcv_df.reset_index()
          .groupby("close")["index"]
          .apply(np.array)
      )
  
      ref_delta = (
          timedelta(minutes=1)
          if data_frequency == "minute"
          else timedelta(days=1)
      )
  
      dups = series.loc[lambda values: [len(x) > 10 for x in values]]
  
      for index, dates in dups.iteritems():
          prev_date = None
          for date in dates:
              if prev_date is not None:
                  delta = (date - prev_date) / 1e9
                  if delta == ref_delta.seconds:
                      log.info("pex")
  
              prev_date = date
  
      problems = []
      for index, dates in dups.iteritems():
          end_dt = (
              asset.end_minute
              if data_frequency == "minute"
              else asset.end_daily
          )
  
          problem = (
              "{name} ({start_dt} to {end_dt}) has {threshold} "
              "identical close values on: {dates}".format(
                  name=asset.symbol,
                  start_dt=asset.start_date.strftime(DATE_TIME_FORMAT),
                  end_dt=end_dt.strftime(DATE_TIME_FORMAT),
                  threshold=threshold,
                  dates=[
                      pd.to_datetime(date).strftime(DATE_TIME_FORMAT)
                      for date in dates
                  ],
              )
          )
  
          problems.append(problem)
  
      return problems
  
imports: import os
  import shutil
  from datetime import timedelta
  from functools import partial
  from itertools import chain
  from operator import is_not
  import numpy
  import pandas
  import pytz
  from catalyst import get_calendar
  from catalyst.assets._assets import TradingPair
  from catalyst.constants import DATE_TIME_FORMAT, AUTO_INGEST
  from catalyst.constants import LOG_LEVEL
  from catalyst.data.minute_bars import BcolzMinuteOverlappingData, BcolzMinuteBarMetadata
  from catalyst.exchange.exchange_bcolz import BcolzExchangeBarReader, BcolzExchangeBarWriter
  from catalyst.exchange.exchange_errors import EmptyValuesInBundleError, TempBundleNotFoundError, NoDataAvailableOnExchange, PricingDataNotLoadedError, DataCorruptionError, PricingDataValueError
  from catalyst.exchange.utils.bundle_utils import range_in_bundle, get_bcolz_chunk, get_df_from_arrays, get_assets
  from catalyst.exchange.utils.datetime_utils import get_start_dt, get_period_label, get_month_start_end, get_year_start_end
  from catalyst.exchange.utils.exchange_utils import get_exchange_folder, save_exchange_symbols, mixin_market_params, get_catalyst_symbol
  from catalyst.utils.cli import maybe_show_progress
  from catalyst.utils.paths import ensure_directory
  from logbook import Logger
  from pytz import UTC
  from six import itervalues
label_desc: Use image node_id 9 for calling the ExchangeBundle obj's underlying member method code with example usage: obj._spot_duplicates(ohlcv_df, asset, data_frequency, threshold) and returns: problems