code: def encode_one_hot_all(self, feat_list: List):
      # asserts that the categorical features are label encoded
      np_feat_list = np.array(feat_list)
      assert all(np.floor(np_feat_list) == np_feat_list)
  
      encoded = starmap(
          self.encode_one_hot, zip(feat_list, self.cardinality)
      )
      encoded_chain = chain.from_iterable(encoded)
      return list(encoded_chain)
  
imports: import concurrent.futures
  import logging
  from enum import Enum
  from itertools import chain, starmap
  from typing import Dict, List, Tuple, Union, Optional, Sequence
  import numpy
  from gluonts.core.component import validated
label_desc: Use image node_id 4 for calling the PreprocessOnlyLagFeatures obj's underlying member method code with example usage: obj.encode_one_hot_all(feat_list) and returns: list