<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_svg(code):
 """Checks if code is an svg image Parameters code: String \tCode to be parsed in order to check svg complaince """


    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