code: def svg2rlg(path, **kwargs):
      "Convert an SVG file to an RLG Drawing object."
  
      # unzip .svgz file into .svg
      unzipped = False
      if isinstance(path, str) and os.path.splitext(path)[1].lower() == ".svgz":
          with gzip.open(path, 'rb') as f_in, open(path[:-1], 'wb') as f_out:
              shutil.copyfileobj(f_in, f_out)
          path = path[:-1]
          unzipped = True
  
      svg_root = load_svg_file(path)
      if svg_root is None:
          return
  
      # convert to a RLG drawing
      svgRenderer = SvgRenderer(path, **kwargs)
      drawing = svgRenderer.render(svg_root)
  
      # remove unzipped .svgz file (.svg)
      if unzipped:
          os.remove(path)
  
      return drawinf svg2rlg(path, **kwargs):
      "Convert an SVG file to an RLG Drawing object."
  
      # unzip .svgz file into .svg
      unzipped = False
      if isinstance(path, str) and os.path.splitext(path)[1].lower() == ".svgz":
          with gzip.open(path, 'rb') as f_in, open(path[:-1], 'wb') as f_out:
              shutil.copyfileobj(f_in, f_out)
          path = path[:-1]
          unzipped = True
  
      svg_root = load_svg_file(path)
      if svg_root is None:
          return
  
      # convert to a RLG drawing
      svgRenderer = SvgRenderer(path, **kwargs)
      drawing = svgRenderer.render(svg_root)
  
      # remove unzipped .svgz file (.svg)
      if unzipped:
          os.remove(path)
  
      return drawing
docs: Convert an SVG file to an RLG Drawing object.