class_docstr: The Random Learning Node changes the way in which the attribute observers
  are updated (by using subsets of features).
  
  Parameters
  ----------
  stats
      Initial class observations.
  depth
      The depth of the node.
  splitter
      The numeric attribute observer algorithm used to monitor target statistics
      and perform split attempts.
  max_features
      Number of attributes per subset for each node split.
  rng
      Random number generator.
  kwargs
      Other parameters passed to the learning node.
class_docstr_tok: ["The","Random","Learning","Node","changes","the","way","in","which","the","attribute","observers","are","updated","(","by","using","subsets","of","features",")",".","Parameters","--","--","--","--","--","stats","Initial","class","observations",".","depth","The","depth","of","the","node",".","splitter","The","numeric","attribute","observer","algorithm","used","to","monitor","target","statistics","and","perform","split","attempts",".","max_features","Number","of","attributes","per","subset","for","each","node","split",".","rng","Random","number","generator",".","kwargs","Other","parameters","passed","to","the","learning","node","."]
code: def _sample_features(self, x, max_features):
      return self.rng.sample(sorted(x.keys()), k=max_features)
  
imports: from __future__ import annotations
  import typing
  from .htc_nodes import LeafMajorityClass, LeafNaiveBayes, LeafNaiveBayesAdaptive
  from .leaf import HTLeaf
label_desc: Use image node_id 3 for calling the BaseRandomLeaf obj's underlying member method code with example usage: obj._sample_features(x, max_features) and returns: self