class_docstr: The standalone RAM usage metric.
  
  Important: this metric approximates the real maximum RAM usage since
  it sample at discrete amount of time the RAM values.
  
  Instances of this metric keeps the maximum RAM usage detected.
  The `start_thread` method starts the usage tracking.
  The `stop_thread` method stops the tracking.
  
  The result, obtained using the `result` method, is the usage in mega-bytes.
  
  The reset method will bring the metric to its initial state. By default
  this metric in its initial state will return an usage value of 0.
class_docstr_tok: ["The","standalone","RAM","usage","metric",".","Important",":","this","metric","approximates","the","real","maximum","RAM","usage","since","it","sample","at","discrete","amount","of","time","the","RAM","values",".","Instances","of","this","metric","keeps","the","maximum","RAM","usage","detected",".","The","`","start_thread","`","method","starts","the","usage","tracking",".","The","`","stop_thread","`","method","stops","the","tracking",".","The","result",",","obtained","using","the","`","result","`","method",",","is","the","usage","in","mega-bytes",".","The","reset","method","will","bring","the","metric","to","its","initial","state",".","By","default","this","metric","in","its","initial","state","will","return","an","usage","value","of","0","."]
docstr: Retrieves the RAM usage.
  
  Calling this method will not change the internal state of the metric.
  
  :return: The average RAM usage in bytes, as a float value.
docstr_tok: ["Retrieves","the","RAM","usage",".","Calling","this","method","will","not","change","the","internal","state","of","the","metric",".",":","return",":","The","average","RAM","usage","in","bytes",",","as","a","float","value","."]
code: def result(self) -> Optional[float]:
      """
      Retrieves the RAM usage.
  
      Calling this method will not change the internal state of the metric.
  
      :return: The average RAM usage in bytes, as a float value.
      """
      return self.max_usage
  
imports: import os
  import time
  from typing import Optional, List, TYPE_CHECKING
  from threading import Thread
  from psutil import Process
  from avalanche.evaluation import Metric, PluginMetric, GenericPluginMetric
  from avalanche.evaluation.metric_results import MetricResult
label_desc: Use image node_id 3 for calling the MaxRAM obj's underlying member method code with example usage: obj.result() and returns: self