Compute the range and break information for the panel

def setup_panel_params(self, scale_x, scale_y):
        """
        Compute the range and break information for the panel
        """

        def train(scale, limits, name):
            """
            Train a single coordinate axis
            """
            # Which axis are we dealing with
            name = scale.aesthetics[0]

            if self.expand:
                expand = self.expand_default(scale)
            else:
                expand = (0, 0, 0, 0)

            if limits is None:
                rangee = scale.dimension(expand)
            else:
                rangee = scale.transform(limits)
                rangee = expand_range_distinct(rangee, expand)

            out = scale.break_info(rangee)
            # This is where
            # x_major, x_labels, x_minor, ...
            # range keys are created
            for key in list(out.keys()):
                new_key = '{}_{}'.format(name, key)
                out[new_key] = out.pop(key)
            return out

        out = dict(
            scales=types.SimpleNamespace(x=scale_x, y=scale_y),
            **train(scale_x, self.limits.xlim, 'x'),
            **train(scale_y, self.limits.ylim, 'y')
        )
        return out