code: def compute_statistic(self, layout):
          
          data = self.data
          if not len(data):
              return type(data)()
  
          params = self.stat.setup_params(data)
          data = self.stat.use_defaults(data)
          data = self.stat.setup_data(data)
          data = self.stat.compute_layer(data, params, layout)
          self.data = data
docs: Compute & return statistics for this layer