code: def setup(self, layers, plot):
          
          data = [l.data for l in layers]
  
          # setup facets
          self.facet = plot.facet
          self.facet.setup_params(data)
          data = self.facet.setup_data(data)
  
          # setup coords
          self.coord = plot.coordinates
          self.coord.setup_params(data)
          data = self.coord.setup_data(data)
  
          # Generate panel layout
          data = self.facet.setup_data(data)
          self.layout = self.facet.compute_layout(data)
          self.layout = self.coord.setup_layout(self.layout)
          self.check_layout()
  
          # Map the data to the panels
          for layer, ldata in zip(layers, data):
              layer.data = self.facet.map(ldata, self.layout)
docs: Create a layout for the panels
  
          The layout is a dataframe that stores all the
          structual information about the panels that will
          make up the plot. The actual layout depends on
          the type of facet.
  
          This method ensures that each layer has a copy of the
          data it needs in `layer.data`. That data is also has
          column `PANEL` that indicates the panel onto which each
          data row/item will be plotted.