code: def is_svg(code):
      
  
      if rsvg is None:
          return
  
      try:
          rsvg.Handle(data=code)
  
      except glib.GError:
          return False
  
      # The SVG file has to refer to its xmlns
      # Hopefully, it does so wiyhin the first 1000 characters
  
      if "http://www.w3.org/2000/svg" in code[:1000]:
          return True
  
      return False
docs: Checks if code is an svg image
  
      Parameters
      ----------
      code: String
      \tCode to be parsed in order to check svg complaince