code: def ingest(
      self,
      environ,
      asset_db_writer,
      minute_bar_writer,
      daily_bar_writer,
      adjustment_writer,
      calendar,
      start_session,
      end_session,
      cache,
      show_progress,
      is_compile,
      output_dir,
  ):
      try:
          api_key = environ.get("CATALYST_API_KEY")
          retries = environ.get("CATALYST_DOWNLOAD_ATTEMPTS", 5)
  
          if is_compile:
              # User has instructed local compilation & ingestion of bundle.
              # Fetch raw metadata for all symbols.
              raw_metadata = self._fetch_metadata_frame(
                  api_key,
                  cache=cache,
                  retries=retries,
                  environ=environ,
                  show_progress=show_progress,
              )
  
              # Compile daily symbol data if bundle supports daily mode and
              # persist the dataset to disk.
              symbol_map = raw_metadata.symbol
              if "daily" in self.frequencies:
                  daily_bar_writer.write(
                      self._fetch_symbol_iter(
                          api_key,
                          cache,
                          symbol_map,
                          calendar,
                          start_session,
                          end_session,
                          "daily",
                          retries,
                      ),
                      assets=raw_metadata.index,
                      show_progress=show_progress,
                  )
  
              # Post-process metadata using cached symbol frames, and write
              # to disk.  This metadata must be written before any attempt
              # to write minute data.
              metadata = self._post_process_metadata(
                  raw_metadata,
                  cache,
                  show_progress=show_progress,
              )
              asset_db_writer.write(metadata)
  
              # Compile minute symbol data if bundle supports minute mode and
              # persist the dataset to disk.
              if "minute" in self.frequencies:
                  minute_bar_writer.write(
                      self._fetch_symbol_iter(
                          api_key,
                          cache,
                          symbol_map,
                          calendar,
                          start_session,
                          end_session,
                          "minute",
                          retries,
                      ),
                      show_progress=show_progress,
                  )
  
              # For legacy purposes, this call is required to ensure the
              # database contains an appropriately initialized file
              # structure.  We don't forsee a usecase for adjustments at
              # this time, but may later choose to expose this functionality
              # in the future.
              adjustment_writer.write(
                  splits=(
                      pd.concat(self.splits, ignore_index=True)
                      if len(self.splits) > 0
                      else None
                  ),
                  dividends=(
                      pd.concat(self.dividends, ignore_index=True)
                      if len(self.dividends) > 0
                      else None
                  ),
              )
          else:
              # Otherwise, user has instructed to download and untar bundle
              # directly from the bundles `tar_url`.
              self._download_and_untar(show_progress, output_dir)
      except Exception as e:
          log.exception(
              " Failed to ingest {name}:\n{msg}".format(
                  name=self.name,
                  msg=str(e),
              )
          )
      else:
          self._reset()
  
imports: from itertools import count
  import tarfile
  from time import sleep
  from abc import abstractmethod, abstractproperty
  import logbook
  import pandas
  from .None import core
  from catalyst.utils.cli import item_show_count, maybe_show_progress
  from catalyst.utils.memoize import lazyval
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 19 for calling the BaseBundle obj's underlying member method code with example usage: obj.ingest(environ, asset_db_writer, minute_bar_writer, daily_bar_writer, adjustment_writer, calendar, start_session, end_session, cache, show_progress, is_compile, output_dir) without return types