code: def csvdir_equities(tframes=None, csvdir=None):
      """
      Generate an ingest function for custom data bundle
      This function can be used in ~/.zipline/extension.py
      to register bundle with custom parameters, e.g. with
      a custom trading calendar.
  
      Parameters
      ----------
      tframes: tuple, optional
          The data time frames, supported timeframes: 'daily' and 'minute'
      csvdir : string, optional, default: CSVDIR environment variable
          The path to the directory of this structure:
          <directory>/<timeframe1>/<symbol1>.csv
          <directory>/<timeframe1>/<symbol2>.csv
          <directory>/<timeframe1>/<symbol3>.csv
          <directory>/<timeframe2>/<symbol1>.csv
          <directory>/<timeframe2>/<symbol2>.csv
          <directory>/<timeframe2>/<symbol3>.csv
  
      Returns
      -------
      ingest : callable
          The bundle ingest function
  
      Examples
      --------
      This code should be added to ~/.zipline/extension.py
      .. code-block:: python
         from zipline.data.bundles import csvdir_equities, register
         register('custom-csvdir-bundle',
                  csvdir_equities(["daily", "minute"],
                  '/full/path/to/the/csvdir/directory'))
      """
  
      return CSVDIRBundle(tframes, csvdir).ingest
  
file_path: zipline/zipline/data/bundles/csvdir.py
imports: import os
  import sys
  from logbook import Logger, StreamHandler
  from numpy import empty
  from pandas import DataFrame, read_csv, Index, Timedelta, NaT
  from trading_calendars import register_calendar_alias
  from zipline.utils.cli import maybe_show_progress
  from .None import core
label_desc: Use image node_id 1 for calling a global function with example usage: csvdir_equities(tframes, csvdir) and returns: CSVDIRBundle