code: def train_position(self, layers, x_scale, y_scale):
          
          layout = self.layout
          if self.panel_scales_x is None and x_scale:
              result = self.facet.init_scales(layout, x_scale, None)
              self.panel_scales_x = result.x
  
          if self.panel_scales_y is None and y_scale:
              result = self.facet.init_scales(layout, None, y_scale)
              self.panel_scales_y = result.y
  
          self.facet.train_position_scales(self, layers)
docs: Create all the required x & y panel_scales y_scales
          and set the ranges for each scale according to the data.
  
          Notes
          -----
          The number of x or y scales depends on the facetting,
          particularly the scales parameter. e.g if `scales='free'`
          then each panel will have separate x and y scales, and
          if `scales='fixed'` then all panels will share an x
          scale and a y scale.