code: def test_latency(self, test_times=10):
      total_time = 0
      for i in range(0, test_times):
          time0 = time.time()
          self.get_state()
          time1 = time.time()
          temp_time = time1 - time0
          total_time += temp_time
      latency = total_time / test_times
      print("latency for data processing: ", latency)
      return latency
  
imports: from __future__ import annotations
  import datetime
  import threading
  import time
  import alpaca_trade_api
  import gym
  import numpy
  import pandas
  import torch
  from finrl.meta.data_processors.processor_alpaca import AlpacaProcessor
  from finrl.meta.paper_trading.common import AgentPPO
label_desc: Use image node_id 2 for calling the PaperTradingAlpaca obj's underlying member method code with example usage: obj.test_latency(test_times) and returns: latency