docstr: Update memories to indicate that a memory was used.
  
  :param memory:
      used memory
  :param memories:
      all the memories
  
  :return memories:
      return memories with usage updated
docstr_tok: ["Update","memories","to","indicate","that","a","memory","was","used",".",":","param","memory",":","used","memory",":","param","memories",":","all","the","memories",":","return","memories",":","return","memories","with","usage","updated"]
code: def update_memory_usage(
      cls, used_memory: str, memories: Dict[str, int]
  ) -> Dict[str, int]:
      """
      Update memories to indicate that a memory was used.
  
      :param memory:
          used memory
      :param memories:
          all the memories
  
      :return memories:
          return memories with usage updated
      """
      assert not used_memory or used_memory in memories
      for mem in memories:
          if mem == used_memory:
              memories[mem] = 0
          else:
              memories[mem] += 1
      return memories
  
imports: import aiohttp
  import asyncio
  from enum import Enum
  import json
  import math
  from nltk.corpus import stopwords
  from nltk.tokenize import word_tokenize
  from nltk.stem import PorterStemmer
  import os
  import random
  import string
  import time
  from typing import List, Tuple, Optional, Dict, Any, Set, Union
  from parlai.agents.ir_baseline.ir_baseline import score_match, MaxPriorityQueue
  from parlai.core.dict import DictionaryAgent
  from parlai.core.message import Message
  from parlai.core.metrics import F1Metric
  from parlai.core.torch_generator_agent import PPLMetric
  import parlai.utils.logging
  import projects.bb3.constants
  import projects.bb3.prompts
  from projects.bb3.agents.module import Module
label_desc: Use image node_id 14 for calling the MemoryUtils obj's underlying member method code with example usage: obj.update_memory_usage(cls, used_memory, memories) and returns: memories