class_docstr: Periodic Resource updater for Tune.
  
  Initially, all resources are set to 0. The updater will try to update resources
  when (1) init ResourceUpdater (2) call "update_avail_resources", "num_cpus"
  or "num_gpus".
  
  The update takes effect when (1) Ray is initialized (2) the interval between
  this and last update is larger than "refresh_period"
code: def __init__(self, refresh_period: Optional[float] = None):
      self._avail_resources = _Resources(cpu=0, gpu=0)
  
      if refresh_period is None:
          refresh_period = float(
              os.environ.get(
                  "TUNE_STATE_REFRESH_PERIOD", TUNE_STATE_REFRESH_PERIOD
              )
          )
      self._refresh_period = refresh_period
      self._last_resource_refresh = float("-inf")
      self.update_avail_resources()
  
imports: import logging
  import os
  import time
  from collections import namedtuple
  from numbers import Number
  from typing import Any, Dict, Optional
  import ray
  from ray._private.resource_spec import NODE_ID_PREFIX
label_desc: Use image node_id 1 to create a new _ResourceUpdater object  with example: obj = _ResourceUpdater(refresh_period)