code: async def getTempCortex(mods=None):
      '''
      Get a proxy to a cortex backed by a temporary directory.
  
      Args:
          mods (list): A list of modules which are loaded into the cortex.
  
      Notes:
          The cortex and temporary directory are town down on exit.
          This should only be called from synchronous code.
  
      Returns:
          Proxy to the cortex.
      '''
      with s_common.getTempDir() as dirn:
  
          async with await Cortex.anit(dirn) as core:
              if mods:
                  for mod in mods:
                      await core.loadCoreModule(mod)
              async with core.getLocalProxy() as prox:
                  yield proync def getTempCortex(mods=None):
      '''
      Get a proxy to a cortex backed by a temporary directory.
  
      Args:
          mods (list): A list of modules which are loaded into the cortex.
  
      Notes:
          The cortex and temporary directory are town down on exit.
          This should only be called from synchronous code.
  
      Returns:
          Proxy to the cortex.
      '''
      with s_common.getTempDir() as dirn:
  
          async with await Cortex.anit(dirn) as core:
              if mods:
                  for mod in mods:
                      await core.loadCoreModule(mod)
              async with core.getLocalProxy() as prox:
                  yield prox
docs: Get a proxy to a cortex backed by a temporary directory.
  
      Args:
          mods (list): A list of modules which are loaded into the cortex.
  
      Notes:
          The cortex and temporary directory are town down on exit.
          This should only be called from synchronous code.
  
      Returns:
          Proxy to the cortex.