docstr: Extract features from the data dictionary. The data dictionary contains values for multiple TAs such as cci, rsi, stocks etc. But here, we will only use the price returns, volume returns, and eom values.
docstr_tok: ["Extract","features","from","the","data","dictionary",".","The","data","dictionary","contains","values","for","multiple","TAs","such","as","cci",",","rsi",",","stocks","etc",".","But","here",",","we","will","only","use","the","price","returns",",","volume","returns",",","and","eom","values","."]
code: def get_features(self, features_dictionary):
      """
      Extract features from the data dictionary. The data dictionary contains values for multiple TAs such as cci, rsi, stocks etc. But here, we will only use the price returns, volume returns, and eom values.
      """
  
      keys_to_use = ["volume_returns", "daily_log_return", "eom"]
      all_keys = list(sorted(features_dictionary.keys()))
      feature_list = []
      for key in all_keys:
          # Check if key is present
          key_in_keys_to_use = [k in key for k in keys_to_use]
          if key_in_keys_to_use.count(True) > 0:
              # Add values for the key
              feature_list.extend(features_dictionary[key])
          else:
              # TAs such as CCI, RSI, STOCHS are being ignored. You can add another condition above to use them
              _ = None
  
      return feature_list
  
imports: import os
  import ta
  import sys
  import json
  import math
  import pickle
  import random
  import requests
  import matplotlib
  import collections
  import numpy
  from os import walk
  import pandas
  import yfinance
  import datetime
  from scipy.stats import linregress
  from datetime import datetime, timedelta
  import warnings
label_desc: Use image node_id 4 for calling the TAEngine obj's underlying member method code with example usage: obj.get_features(features_dictionary) and returns: feature_list