code: async def setLayers(self, layers):
          '''
          Set the view layers from a list of idens.
          NOTE: view layers are stored "top down" ( write is layers[0] )
          '''
          layrs = []
  
          for iden in layers:
              layr = self.core.layers.get(iden)
              if layr is None:
                  raise s_exc.NoSuchLayer(iden=iden)
              if not layrs and layr.readonly:
                  raise s_exc.ReadOnlyLayer(mesg=f'First layer {layr.iden} must not be read-only')
  
              layrs.append(layr)
  
          self.borked = None
          self.layers = layrs
  
          await self.info.set('layers', layersync def setLayers(self, layers):
          '''
          Set the view layers from a list of idens.
          NOTE: view layers are stored "top down" ( write is layers[0] )
          '''
          layrs = []
  
          for iden in layers:
              layr = self.core.layers.get(iden)
              if layr is None:
                  raise s_exc.NoSuchLayer(iden=iden)
              if not layrs and layr.readonly:
                  raise s_exc.ReadOnlyLayer(mesg=f'First layer {layr.iden} must not be read-only')
  
              layrs.append(layr)
  
          self.borked = None
          self.layers = layrs
  
          await self.info.set('layers', layers)
docs: Set the view layers from a list of idens.
          NOTE: view layers are stored "top down" ( write is layers[0] )