code: def __init__(self, content=None, parent=None):
      Transformable.__init__(self, content, parent)
      self._paths = []
  
      if not isinstance(content, str):
          content = content.get("d", "")
  
      commands = re.compile(
          r"(?P<command>[MLVHCSQTAZmlvhcsqtaz])"
          r"(?P<points>[+\-0-9.e, \n\t]*)"
      )
  
      path = []
      for match in re.finditer(commands, content):
          command = match.group("command")
          points = match.group("points").replace(",", " ")
          points = [float(v) for v in points.split()]
          relative = command in "mlvhcsqtaz"
          command = command.upper()
  
          while len(points) or command == "Z":
              if command == "M":
                  if len(path):
                      self._paths.append(path)
                  path = []
                  path.append(Move(*points[:2], relative=relative))
                  points = points[2:]
              elif command == "L":
                  path.append(Line(*points[:2], relative=relative))
                  points = points[2:]
              elif command == "V":
                  path.append(VLine(*points[:1], relative=relative))
                  points = points[1:]
              elif command == "H":
                  path.append(HLine(*points[:1], relative=relative))
                  points = points[1:]
              elif command == "C":
                  path.append(Cubic(*points[:6], relative=relative))
                  points = points[6:]
              elif command == "S":
                  path.append(
                      SmoothCubic(*points[:4], relative=relative)
                  )
                  points = points[4:]
              elif command == "Q":
                  path.append(Quadratic(*points[:4], relative=relative))
                  points = points[4:]
              elif command == "T":
                  path.append(
                      SmoothQuadratic(*points[2:], relative=relative)
                  )
                  points = points[2:]
              elif command == "A":
                  path.append(Arc(*points[:7], relative=relative))
                  points = points[7:]
              elif command == "Z":
                  path.append(Close(relative=relative))
                  self._paths.append(path)
                  path = []
                  break
              else:
                  raise RuntimeError(
                      "Unknown SVG path command(%s)" % command
                  )
  
      if len(path):
          self._paths.append(path)
  
imports: import re
  import math
  import numpy
  from .None import geometry
  from .geometry import epsilon
  from .transformable import Transformable
label_desc: Use image node_id 1 to create a new Path object from inherited base classes: Transformable with example: obj = Path(content, parent)