code: def handle_minute_close(self, dt, data_portal):
          
          self.sync_last_sale_prices(dt, data_portal)
  
          packet = {
              'period_start': self._first_session,
              'period_end': self._last_session,
              'capital_base': self._capital_base,
              'minute_perf': {
                  'period_open': self._market_open,
                  'period_close': dt,
              },
              'cumulative_perf': {
                  'period_open': self._first_session,
                  'period_close': self._last_session,
              },
              'progress': self._progress(self),
              'cumulative_risk_metrics': {},
          }
          ledger = self._ledger
          ledger.end_of_bar(self._session_count)
          self.end_of_bar(
              packet,
              ledger,
              dt,
              self._session_count,
              data_portal,
          )
          return packet
docs: Handles the close of the given minute in minute emission.
  
          Parameters
          ----------
          dt : Timestamp
              The minute that is ending
  
          Returns
          -------
          A minute perf packet.