code: def _prune_dict(self, max_size: int) -> None:
      if len(self) >= max_size:
          diff = len(self) - max_size
          for k in list(self.keys())[:diff]:
              del self[k]
  
file_path: wandb/wandb/sdk/lib/capped_dict.py
imports: import collections
  from typing import Any, Optional
label_desc: Use image node_id 4 for calling the CappedDict obj's underlying member method code with example usage: obj._prune_dict(max_size) without return types