code: def to_numpy(df: pd.DataFrame):
      dates, packets = to_daily_packets(df)
      empty_mins = np.sum(packets[:, :, 4] == 0)
      filled_mins = np.sum(packets[:, :, 4] > 0)
      empty_mins_high_activity = np.sum(packets[:, :, 4] == 0)
      fill_empty_minutes_in_packets(packets)
      zero_price = np.sum(packets[:, :, 0:4] == 0)
      zero_volume = np.sum(packets[:, :, 4] == 0)
      packets[:, :, 4] = np.maximum(packets[:, :, 4], 1)
  
      logger.inspect(
          empty_mins=empty_mins,
          filled_mins=filled_mins,
          empty_mins_high_activity=empty_mins_high_activity,
          zero_price=zero_price,
          zero_volume=zero_volume,
      )
  
      return dates, packets
  
file_path: labml/samples/stocks/build_numpy_cache.py
imports: import urllib.request
  import numpy
  import pandas
  from labml import monit, lab, logger
  from stocks import CandleIdx
label_desc: Use image node_id 6 for calling a global function with example usage: to_numpy(df) and returns: dates,  packets