class_docstr: Actor handling worker memory quota
class_docstr_tok: ["Actor","handling","worker","memory","quota"]
code: def _log_allocate(
      self, msg: str, *args, **kwargs
  ):  # pragma: no cover
      if logger.getEffectiveLevel() > logging.DEBUG:
          return
  
      if self._hard_limit is None:
          return super()._log_allocate(msg, *args, **kwargs)
  
      mem_stats = mars_resource.virtual_memory()
      # calc available physical memory
      available_size = (
          mem_stats.available
          - max(0, mem_stats.total - self._hard_limit)
          - (self._total_allocated - self._total_hold)
      )
      args += (
          self._total_allocated,
          self._quota_size,
          mem_stats.available,
          available_size,
          self._hard_limit,
          self._total_hold,
      )
  
      logger.debug(
          msg
          + " Allocated: %s, Quota size: %s, Phy available: %s, Hard available: %s,"
          " Hard limit: %s, Holding: %s",
          *args,
          **kwargs,
      )
  
imports: import asyncio
  import itertools
  import logging
  import time
  from collections import namedtuple, OrderedDict
  from dataclasses import dataclass
  from typing import Dict, Optional, Tuple, Union
  from ....None import oscar
  from ....None import resource
  from ....typing import BandType
  from ...cluster import QuotaInfo
label_desc: Use image node_id 2 for calling the MemQuotaActor obj's underlying member method code with example usage: obj._log_allocate(msg) and returns: super