code: def preprocess_to_ohlcv(self, df, time_interval="60S"):
      df = df[["date", "time_m", "sym_root", "size", "price"]]
      tic_list = np.unique(df["sym_root"].values)
      final_df = None
      first_time = True
      for i in range(len(tic_list)):
          tic = tic_list[i]
          time_list = []
          temp_df = df[df["sym_root"] == tic]
          for i in range(0, temp_df.shape[0]):
              date = temp_df["date"].iloc[i]
              time_m = temp_df["time_m"].iloc[i]
              time = str(date) + " " + str(time_m)
              try:
                  time = datetime.datetime.strptime(
                      time, "%Y-%m-%d %H:%M:%S.%f"
                  )
              except BaseException:
                  time = datetime.datetime.strptime(
                      time, "%Y-%m-%d %H:%M:%S"
                  )
              time_list.append(time)
          temp_df["time"] = time_list
          temp_df = temp_df.set_index("time")
          data_ohlc = temp_df["price"].resample(time_interval).ohlc()
          data_v = (
              temp_df["size"]
              .resample(time_interval)
              .agg({"size": "sum"})
          )
          volume = data_v["size"].values
          data_ohlc["volume"] = volume
          data_ohlc["tic"] = tic
          if first_time:
              final_df = data_ohlc.reset_index()
              first_time = False
          else:
              final_df = final_df.append(
                  data_ohlc.reset_index(), ignore_index=True
              )
      return final_df
  
file_path: FinRL/finrl/meta/data_processors/processor_wrds.py
imports: from __future__ import annotations
  import datetime
  import exchange_calendars
  import numpy
  import pandas
  import pytz
  import wrds
  from stockstats import StockDataFrame
label_desc: Use image node_id 3 for calling the WrdsProcessor obj's underlying member method code with example usage: obj.preprocess_to_ohlcv(df, time_interval) and returns: final_df