prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Allow `Cross` to be initialized without being based on an existing Mobject.
  ## Enhancement proposal
  <!-- Add a clear and concise description of your enhancement proposal. In particular,
       if your enhancement introduces changes to the API, illustrate them with
       (fictional) code examples. -->
  
  Currently Cross needs a mobject passed to it, I think it should be reworked to not necessarily require this. Also maybe easily specifying the length of the cross in the `__init__` too?
  
  
  Current `Cross` code:
  ```py
  class Cross(VGroup):
      def __init__(self, mobject, stroke_color=RED, stroke_width=6, **kwargs):
          VGroup.__init__(
              self,
              Line(UP + LEFT, DOWN + RIGHT),
              Line(UP + RIGHT, DOWN + LEFT),
          )
          self.replace(mobject, stretch=True)
          self.set_stroke(color=stroke_color, width=stroke_width)
  ```
  
  ## Additional comments
  <!-- Add further context that you think might be relevant. -->
  replacing `VGroup.__init__` with `super().__init__` too 
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `manim/mobject/shape_matchers.py`
  Content:
  ```
  1 """Mobjects used to mark and annotate other mobjects."""
  2 
  3 __all__ = ["SurroundingRectangle", "BackgroundRectangle", "Cross", "Underline"]
  4 
  5 
  6 from ..constants import *
  7 from ..mobject.geometry import Line, Rectangle
  8 from ..mobject.types.vectorized_mobject import VGroup, VMobject
  9 from ..utils.color import BLACK, RED, YELLOW, Color
  10 
  11 
  12 class SurroundingRectangle(Rectangle):
  13     r"""A rectangle surrounding a :class:`~.Mobject`
  14 
  15     Examples
  16     --------
  17 
  18     .. manim:: SurroundingRectExample
  19         :save_last_frame:
  20 
  21         class SurroundingRectExample(Scene):
  22             def construct(self):
  23                 title = Title("A Quote from Newton")
  24                 quote = Text(
  25                     "If I have seen further than others, \n"
  26                     "it is by standing upon the shoulders of giants.",
  27                     color=BLUE
  28                 ).scale(0.75)
  29                 box = SurroundingRectangle(quote, color=YELLOW, buff=MED_LARGE_BUFF)
  30                 self.add(title, box, quote)
  31 
  32     """
  33 
  34     def __init__(self, mobject, color=YELLOW, buff=SMALL_BUFF, **kwargs):
  35         self.color = color
  36         self.buff = buff
  37         Rectangle.__init__(
  38             self,
  39             color=color,
  40             width=mobject.width + 2 * self.buff,
  41             height=mobject.height + 2 * self.buff,
  42             **kwargs
  43         )
  44         self.move_to(mobject)
  45 
  46 
  47 class BackgroundRectangle(SurroundingRectangle):
  48     """A background rectangle
  49 
  50     Examples
  51     --------
  52 
  53     .. manim:: ExampleBackgroundRectangle
  54         :save_last_frame:
  55 
  56         class ExampleBackgroundRectangle(Scene):
  57             def construct(self):
  58                 circle = Circle().shift(LEFT)
  59                 circle.set_stroke(color=GREEN, width=20)
  60                 triangle = Triangle().shift(2 * RIGHT)
  61                 triangle.set_fill(PINK, opacity=0.5)
  62                 backgroundRectangle1 = BackgroundRectangle(circle, color=WHITE, fill_opacity=0.15)
  63                 backgroundRectangle2 = BackgroundRectangle(triangle, color=WHITE, fill_opacity=0.15)
  64                 self.add(backgroundRectangle1)
  65                 self.add(backgroundRectangle2)
  66                 self.add(circle)
  67                 self.add(triangle)
  68                 self.play(Rotate(backgroundRectangle1, PI / 4))
  69                 self.play(Rotate(backgroundRectangle2, PI / 2))
  70     """
  71 
  72     def __init__(
  73         self,
  74         mobject,
  75         color=BLACK,
  76         stroke_width=0,
  77         stroke_opacity=0,
  78         fill_opacity=0.75,
  79         buff=0,
  80         **kwargs
  81     ):
  82         SurroundingRectangle.__init__(
  83             self,
  84             mobject,
  85             color=color,
  86             stroke_width=stroke_width,
  87             stroke_opacity=stroke_opacity,
  88             fill_opacity=fill_opacity,
  89             buff=buff,
  90             **kwargs
  91         )
  92         self.original_fill_opacity = self.fill_opacity
  93 
  94     def pointwise_become_partial(self, mobject, a, b):
  95         self.set_fill(opacity=b * self.original_fill_opacity)
  96         return self
  97 
  98     def set_style(
  99         self,
  100         stroke_color=None,
  101         stroke_width=None,
  102         fill_color=None,
  103         fill_opacity=None,
  104         family=True,
  105     ):
  106         # Unchangeable style, except for fill_opacity
  107         super().set_style(
  108             stroke_color=BLACK,
  109             stroke_width=0,
  110             fill_color=BLACK,
  111             fill_opacity=fill_opacity,
  112         )
  113         return self
  114 
  115     def get_fill_color(self):
  116         return Color(self.color)
  117 
  118 
  119 class Cross(VGroup):
  120     def __init__(self, mobject, stroke_color=RED, stroke_width=6, **kwargs):
  121         VGroup.__init__(
  122             self,
  123             Line(UP + LEFT, DOWN + RIGHT),
  124             Line(UP + RIGHT, DOWN + LEFT),
  125         )
  126         self.replace(mobject, stretch=True)
  127         self.set_stroke(color=stroke_color, width=stroke_width)
  128 
  129 
  130 class Underline(Line):
  131     """Creates an underline.
  132 
  133     Parameters
  134     ----------
  135     Line
  136         The underline.
  137 
  138     Examples
  139     --------
  140     .. manim:: UnderLine
  141         :save_last_frame:
  142 
  143         class UnderLine(Scene):
  144             def construct(self):
  145                 man = Tex("Manim")  # Full Word
  146                 ul = Underline(man)  # Underlining the word
  147                 self.add(man, ul)
  148     """
  149 
  150     def __init__(self, mobject, buff=SMALL_BUFF, **kwargs):
  151         super().__init__(LEFT, RIGHT, buff=buff, **kwargs)
  152         self.match_width(mobject)
  153         self.next_to(mobject, DOWN, buff=self.buff)
  154
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/manim/mobject/shape_matchers.py b/manim/mobject/shape_matchers.py
  --- a/manim/mobject/shape_matchers.py
  +++ b/manim/mobject/shape_matchers.py
  @@ -2,10 +2,12 @@
   
   __all__ = ["SurroundingRectangle", "BackgroundRectangle", "Cross", "Underline"]
   
  +from typing import Optional
   
   from ..constants import *
   from ..mobject.geometry import Line, Rectangle
  -from ..mobject.types.vectorized_mobject import VGroup, VMobject
  +from ..mobject.mobject import Mobject
  +from ..mobject.types.vectorized_mobject import VGroup
   from ..utils.color import BLACK, RED, YELLOW, Color
   
   
  @@ -117,13 +119,44 @@
   
   
   class Cross(VGroup):
  -    def __init__(self, mobject, stroke_color=RED, stroke_width=6, **kwargs):
  -        VGroup.__init__(
  -            self,
  -            Line(UP + LEFT, DOWN + RIGHT),
  -            Line(UP + RIGHT, DOWN + LEFT),
  +    """Creates a cross.
  +
  +    Parameters
  +    ----------
  +    mobject
  +        The mobject linked to this instance. It fits the mobject when specified. Defaults to None.
  +    stroke_color
  +        Specifies the color of the cross lines. Defaults to RED.
  +    stroke_width
  +        Specifies the width of the cross lines. Defaults to 6.
  +    scale_factor
  +        Scales the cross to the provided units. Defaults to 1.
  +
  +    Examples
  +    --------
  +    .. manim:: ExampleCross
  +        :save_last_frame:
  +
  +        class ExampleCross(Scene):
  +            def construct(self):
  +                cross = Cross()
  +                self.add(cross)
  +    """
  +
  +    def __init__(
  +        self,
  +        mobject: Optional["Mobject"] = None,
  +        stroke_color: Color = RED,
  +        stroke_width: float = 6,
  +        scale_factor: float = 1,
  +        **kwargs
  +    ):
  +        super().__init__(
  +            Line(UP + LEFT, DOWN + RIGHT), Line(UP + RIGHT, DOWN + LEFT), **kwargs
           )
  -        self.replace(mobject, stretch=True)
  +        if mobject is not None:
  +            self.replace(mobject, stretch=True)
  +        self.scale(scale_factor)
           self.set_stroke(color=stroke_color, width=stroke_width)
  
verification_info: {"golden_diff": "diff --git a/manim/mobject/shape_matchers.py b/manim/mobject/shape_matchers.py\n--- a/manim/mobject/shape_matchers.py\n+++ b/manim/mobject/shape_matchers.py\n@@ -2,10 +2,12 @@\n \n __all__ = [\"SurroundingRectangle\", \"BackgroundRectangle\", \"Cross\", \"Underline\"]\n \n+from typing import Optional\n \n from ..constants import *\n from ..mobject.geometry import Line, Rectangle\n-from ..mobject.types.vectorized_mobject import VGroup, VMobject\n+from ..mobject.mobject import Mobject\n+from ..mobject.types.vectorized_mobject import VGroup\n from ..utils.color import BLACK, RED, YELLOW, Color\n \n \n@@ -117,13 +119,44 @@\n \n \n class Cross(VGroup):\n-    def __init__(self, mobject, stroke_color=RED, stroke_width=6, **kwargs):\n-        VGroup.__init__(\n-            self,\n-            Line(UP + LEFT, DOWN + RIGHT),\n-            Line(UP + RIGHT, DOWN + LEFT),\n+    \"\"\"Creates a cross.\n+\n+    Parameters\n+    ----------\n+    mobject\n+        The mobject linked to this instance. It fits the mobject when specified. Defaults to None.\n+    stroke_color\n+        Specifies the color of the cross lines. Defaults to RED.\n+    stroke_width\n+        Specifies the width of the cross lines. Defaults to 6.\n+    scale_factor\n+        Scales the cross to the provided units. Defaults to 1.\n+\n+    Examples\n+    --------\n+    .. manim:: ExampleCross\n+        :save_last_frame:\n+\n+        class ExampleCross(Scene):\n+            def construct(self):\n+                cross = Cross()\n+                self.add(cross)\n+    \"\"\"\n+\n+    def __init__(\n+        self,\n+        mobject: Optional[\"Mobject\"] = None,\n+        stroke_color: Color = RED,\n+        stroke_width: float = 6,\n+        scale_factor: float = 1,\n+        **kwargs\n+    ):\n+        super().__init__(\n+            Line(UP + LEFT, DOWN + RIGHT), Line(UP + RIGHT, DOWN + LEFT), **kwargs\n         )\n-        self.replace(mobject, stretch=True)\n+        if mobject is not None:\n+            self.replace(mobject, stretch=True)\n+        self.scale(scale_factor)\n         self.set_stroke(color=stroke_color, width=stroke_width)\n", "issue": "Allow `Cross` to be initialized without being based on an existing Mobject.\n## Enhancement proposal\r\n<!-- Add a clear and concise description of your enhancement proposal. In particular,\r\n     if your enhancement introduces changes to the API, illustrate them with\r\n     (fictional) code examples. -->\r\n\r\nCurrently Cross needs a mobject passed to it, I think it should be reworked to not necessarily require this. Also maybe easily specifying the length of the cross in the `__init__` too?\r\n\r\n\r\nCurrent `Cross` code:\r\n```py\r\nclass Cross(VGroup):\r\n    def __init__(self, mobject, stroke_color=RED, stroke_width=6, **kwargs):\r\n        VGroup.__init__(\r\n            self,\r\n            Line(UP + LEFT, DOWN + RIGHT),\r\n            Line(UP + RIGHT, DOWN + LEFT),\r\n        )\r\n        self.replace(mobject, stretch=True)\r\n        self.set_stroke(color=stroke_color, width=stroke_width)\r\n```\r\n\r\n## Additional comments\r\n<!-- Add further context that you think might be relevant. -->\r\nreplacing `VGroup.__init__` with `super().__init__` too \r\n\n", "before_files": [{"content": "\"\"\"Mobjects used to mark and annotate other mobjects.\"\"\"\n\n__all__ = [\"SurroundingRectangle\", \"BackgroundRectangle\", \"Cross\", \"Underline\"]\n\n\nfrom ..constants import *\nfrom ..mobject.geometry import Line, Rectangle\nfrom ..mobject.types.vectorized_mobject import VGroup, VMobject\nfrom ..utils.color import BLACK, RED, YELLOW, Color\n\n\nclass SurroundingRectangle(Rectangle):\n    r\"\"\"A rectangle surrounding a :class:`~.Mobject`\n\n    Examples\n    --------\n\n    .. manim:: SurroundingRectExample\n        :save_last_frame:\n\n        class SurroundingRectExample(Scene):\n            def construct(self):\n                title = Title(\"A Quote from Newton\")\n                quote = Text(\n                    \"If I have seen further than others, \\n\"\n                    \"it is by standing upon the shoulders of giants.\",\n                    color=BLUE\n                ).scale(0.75)\n                box = SurroundingRectangle(quote, color=YELLOW, buff=MED_LARGE_BUFF)\n                self.add(title, box, quote)\n\n    \"\"\"\n\n    def __init__(self, mobject, color=YELLOW, buff=SMALL_BUFF, **kwargs):\n        self.color = color\n        self.buff = buff\n        Rectangle.__init__(\n            self,\n            color=color,\n            width=mobject.width + 2 * self.buff,\n            height=mobject.height + 2 * self.buff,\n            **kwargs\n        )\n        self.move_to(mobject)\n\n\nclass BackgroundRectangle(SurroundingRectangle):\n    \"\"\"A background rectangle\n\n    Examples\n    --------\n\n    .. manim:: ExampleBackgroundRectangle\n        :save_last_frame:\n\n        class ExampleBackgroundRectangle(Scene):\n            def construct(self):\n                circle = Circle().shift(LEFT)\n                circle.set_stroke(color=GREEN, width=20)\n                triangle = Triangle().shift(2 * RIGHT)\n                triangle.set_fill(PINK, opacity=0.5)\n                backgroundRectangle1 = BackgroundRectangle(circle, color=WHITE, fill_opacity=0.15)\n                backgroundRectangle2 = BackgroundRectangle(triangle, color=WHITE, fill_opacity=0.15)\n                self.add(backgroundRectangle1)\n                self.add(backgroundRectangle2)\n                self.add(circle)\n                self.add(triangle)\n                self.play(Rotate(backgroundRectangle1, PI / 4))\n                self.play(Rotate(backgroundRectangle2, PI / 2))\n    \"\"\"\n\n    def __init__(\n        self,\n        mobject,\n        color=BLACK,\n        stroke_width=0,\n        stroke_opacity=0,\n        fill_opacity=0.75,\n        buff=0,\n        **kwargs\n    ):\n        SurroundingRectangle.__init__(\n            self,\n            mobject,\n            color=color,\n            stroke_width=stroke_width,\n            stroke_opacity=stroke_opacity,\n            fill_opacity=fill_opacity,\n            buff=buff,\n            **kwargs\n        )\n        self.original_fill_opacity = self.fill_opacity\n\n    def pointwise_become_partial(self, mobject, a, b):\n        self.set_fill(opacity=b * self.original_fill_opacity)\n        return self\n\n    def set_style(\n        self,\n        stroke_color=None,\n        stroke_width=None,\n        fill_color=None,\n        fill_opacity=None,\n        family=True,\n    ):\n        # Unchangeable style, except for fill_opacity\n        super().set_style(\n            stroke_color=BLACK,\n            stroke_width=0,\n            fill_color=BLACK,\n            fill_opacity=fill_opacity,\n        )\n        return self\n\n    def get_fill_color(self):\n        return Color(self.color)\n\n\nclass Cross(VGroup):\n    def __init__(self, mobject, stroke_color=RED, stroke_width=6, **kwargs):\n        VGroup.__init__(\n            self,\n            Line(UP + LEFT, DOWN + RIGHT),\n            Line(UP + RIGHT, DOWN + LEFT),\n        )\n        self.replace(mobject, stretch=True)\n        self.set_stroke(color=stroke_color, width=stroke_width)\n\n\nclass Underline(Line):\n    \"\"\"Creates an underline.\n\n    Parameters\n    ----------\n    Line\n        The underline.\n\n    Examples\n    --------\n    .. manim:: UnderLine\n        :save_last_frame:\n\n        class UnderLine(Scene):\n            def construct(self):\n                man = Tex(\"Manim\")  # Full Word\n                ul = Underline(man)  # Underlining the word\n                self.add(man, ul)\n    \"\"\"\n\n    def __init__(self, mobject, buff=SMALL_BUFF, **kwargs):\n        super().__init__(LEFT, RIGHT, buff=buff, **kwargs)\n        self.match_width(mobject)\n        self.next_to(mobject, DOWN, buff=self.buff)\n", "path": "manim/mobject/shape_matchers.py"}], "after_files": [{"content": "\"\"\"Mobjects used to mark and annotate other mobjects.\"\"\"\n\n__all__ = [\"SurroundingRectangle\", \"BackgroundRectangle\", \"Cross\", \"Underline\"]\n\nfrom typing import Optional\n\nfrom ..constants import *\nfrom ..mobject.geometry import Line, Rectangle\nfrom ..mobject.mobject import Mobject\nfrom ..mobject.types.vectorized_mobject import VGroup\nfrom ..utils.color import BLACK, RED, YELLOW, Color\n\n\nclass SurroundingRectangle(Rectangle):\n    r\"\"\"A rectangle surrounding a :class:`~.Mobject`\n\n    Examples\n    --------\n\n    .. manim:: SurroundingRectExample\n        :save_last_frame:\n\n        class SurroundingRectExample(Scene):\n            def construct(self):\n                title = Title(\"A Quote from Newton\")\n                quote = Text(\n                    \"If I have seen further than others, \\n\"\n                    \"it is by standing upon the shoulders of giants.\",\n                    color=BLUE\n                ).scale(0.75)\n                box = SurroundingRectangle(quote, color=YELLOW, buff=MED_LARGE_BUFF)\n                self.add(title, box, quote)\n\n    \"\"\"\n\n    def __init__(self, mobject, color=YELLOW, buff=SMALL_BUFF, **kwargs):\n        self.color = color\n        self.buff = buff\n        Rectangle.__init__(\n            self,\n            color=color,\n            width=mobject.width + 2 * self.buff,\n            height=mobject.height + 2 * self.buff,\n            **kwargs\n        )\n        self.move_to(mobject)\n\n\nclass BackgroundRectangle(SurroundingRectangle):\n    \"\"\"A background rectangle\n\n    Examples\n    --------\n\n    .. manim:: ExampleBackgroundRectangle\n        :save_last_frame:\n\n        class ExampleBackgroundRectangle(Scene):\n            def construct(self):\n                circle = Circle().shift(LEFT)\n                circle.set_stroke(color=GREEN, width=20)\n                triangle = Triangle().shift(2 * RIGHT)\n                triangle.set_fill(PINK, opacity=0.5)\n                backgroundRectangle1 = BackgroundRectangle(circle, color=WHITE, fill_opacity=0.15)\n                backgroundRectangle2 = BackgroundRectangle(triangle, color=WHITE, fill_opacity=0.15)\n                self.add(backgroundRectangle1)\n                self.add(backgroundRectangle2)\n                self.add(circle)\n                self.add(triangle)\n                self.play(Rotate(backgroundRectangle1, PI / 4))\n                self.play(Rotate(backgroundRectangle2, PI / 2))\n    \"\"\"\n\n    def __init__(\n        self,\n        mobject,\n        color=BLACK,\n        stroke_width=0,\n        stroke_opacity=0,\n        fill_opacity=0.75,\n        buff=0,\n        **kwargs\n    ):\n        SurroundingRectangle.__init__(\n            self,\n            mobject,\n            color=color,\n            stroke_width=stroke_width,\n            stroke_opacity=stroke_opacity,\n            fill_opacity=fill_opacity,\n            buff=buff,\n            **kwargs\n        )\n        self.original_fill_opacity = self.fill_opacity\n\n    def pointwise_become_partial(self, mobject, a, b):\n        self.set_fill(opacity=b * self.original_fill_opacity)\n        return self\n\n    def set_style(\n        self,\n        stroke_color=None,\n        stroke_width=None,\n        fill_color=None,\n        fill_opacity=None,\n        family=True,\n    ):\n        # Unchangeable style, except for fill_opacity\n        super().set_style(\n            stroke_color=BLACK,\n            stroke_width=0,\n            fill_color=BLACK,\n            fill_opacity=fill_opacity,\n        )\n        return self\n\n    def get_fill_color(self):\n        return Color(self.color)\n\n\nclass Cross(VGroup):\n    \"\"\"Creates a cross.\n\n    Parameters\n    ----------\n    mobject\n        The mobject linked to this instance. It fits the mobject when specified. Defaults to None.\n    stroke_color\n        Specifies the color of the cross lines. Defaults to RED.\n    stroke_width\n        Specifies the width of the cross lines. Defaults to 6.\n    scale_factor\n        Scales the cross to the provided units. Defaults to 1.\n\n    Examples\n    --------\n    .. manim:: ExampleCross\n        :save_last_frame:\n\n        class ExampleCross(Scene):\n            def construct(self):\n                cross = Cross()\n                self.add(cross)\n    \"\"\"\n\n    def __init__(\n        self,\n        mobject: Optional[\"Mobject\"] = None,\n        stroke_color: Color = RED,\n        stroke_width: float = 6,\n        scale_factor: float = 1,\n        **kwargs\n    ):\n        super().__init__(\n            Line(UP + LEFT, DOWN + RIGHT), Line(UP + RIGHT, DOWN + LEFT), **kwargs\n        )\n        if mobject is not None:\n            self.replace(mobject, stretch=True)\n        self.scale(scale_factor)\n        self.set_stroke(color=stroke_color, width=stroke_width)\n\n\nclass Underline(Line):\n    \"\"\"Creates an underline.\n\n    Parameters\n    ----------\n    Line\n        The underline.\n\n    Examples\n    --------\n    .. manim:: UnderLine\n        :save_last_frame:\n\n        class UnderLine(Scene):\n            def construct(self):\n                man = Tex(\"Manim\")  # Full Word\n                ul = Underline(man)  # Underlining the word\n                self.add(man, ul)\n    \"\"\"\n\n    def __init__(self, mobject, buff=SMALL_BUFF, **kwargs):\n        super().__init__(LEFT, RIGHT, buff=buff, **kwargs)\n        self.match_width(mobject)\n        self.next_to(mobject, DOWN, buff=self.buff)\n", "path": "manim/mobject/shape_matchers.py"}]}