Repository: ManimCommunity/manim
File: manim/mobject/geometry/labeled.py (Python)

Code before:
    --------
    .. manim:: LabeledLineExample
        :save_last_frame:

        class LabeledLineExample(Scene):
            def construct(self):
                line = LabeledLine(
                    label          = '0.5',
                    label_position = 0.8,
                    font_size      = 20,
                    label_color    = WHITE,
                    label_frame    = True,

                    start=LEFT+DOWN,
                    end=RIGHT+UP)


                line.set_length(line.get_length() * 2)
                self.add(line)
    """

    def __init__(
        self,
        label: str | Tex | MathTex | Text,
        label_position: float = 0.5,
        font_size: float = 15,
        label_color: Color | str | None = WHITE,
        label_frame: bool = True,
        frame_fill_color: Color | str | None = None,
        frame_fill_opacity: float = 1,
        *args,
        **kwargs,
    ) -> None:
        if isinstance(label, str):
            from manim import MathTex

            rendered_label = MathTex(label, color=label_color, font_size=font_size)
        else:
            rendered_label = label

        super().__init__(*args, **kwargs)

        # calculating the vector for the label position
        line_start, line_end = self.get_start_and_end()
        new_vec = (line_end - line_start) * label_position
        label_coords = line_start + new_vec

        # rendered_label.move_to(self.get_vector() * label_position)
        rendered_label.move_to(label_coords)

        box = BackgroundRectangle(

Review comment (suggestion):
Should this be DEFAULT_FONT_SIZE? Is 15 too small/too specific to the neural network stuff?
```suggestion
        font_size: float = DEFAULT_FONT_SIZE,
```

Code after:
    .. manim:: LabeledLineExample
        :save_last_frame:

        class LabeledLineExample(Scene):
            def construct(self):
                line = LabeledLine(
                    label          = '0.5',
                    label_position = 0.8,
                    font_size      = 20,
                    label_color    = WHITE,
                    label_frame    = True,

                    start=LEFT+DOWN,
                    end=RIGHT+UP)


                line.set_length(line.get_length() * 2)
                self.add(line)
    """

    def __init__(
        self,
        label: str | Tex | MathTex | Text,
        label_position: float = 0.5,
        font_size: float = DEFAULT_FONT_SIZE,
        label_color: Color | str | None = WHITE,
        label_frame: bool = True,
        frame_fill_color: Color | str | None = None,
        frame_fill_opacity: float = 1,
        *args,
        **kwargs,
    ) -> None:
        if isinstance(label, str):
            from manim import MathTex

            rendered_label = MathTex(label, color=label_color, font_size=font_size)
        else:
            rendered_label = label

        super().__init__(*args, **kwargs)

        # calculating the vector for the label position
        line_start, line_end = self.get_start_and_end()
        new_vec = (line_end - line_start) * label_position
        label_coords = line_start + new_vec

        # rendered_label.move_to(self.get_vector() * label_position)
        rendered_label.move_to(label_coords)

        box = BackgroundRectangle(
            rendered_label,