code: def fill_empty_minutes_in_packet(packet: np.ndarray):
      last_idx = None
      for i in range(390):
          if np.sum(packet[i] == 0) > 0:
              if last_idx is not None:
                  packet[i, 0:4] = packet[last_idx, 0:4]
          if np.sum(packet[i] > 0) == len(packet[i]):
              if last_idx is None:
                  for j in range(i):
                      packet[j, 0:4] = packet[i, 0:4]
              last_idx = i
  
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 4 for calling a global function with example usage: fill_empty_minutes_in_packet(packet) without return types