def PolygonOptions(adict):
    if adict.has_key("paths"):
        try:
            if isinstance(adict["paths"], (list,tuple)):
                adict["paths"] = listToJs(adict["paths"])
            elif isinstance(adict["paths"], basestring): #Gmaps
                adict["paths"] = decodePoly(adict["paths"])
        except: #isinstance throws exception for raw javascript objects.
            pass #That means it's already good.
    return dictToJs(adict)
Accepts a dictionary of options. If necessary, transforms "paths" from
dataset/ETHPy150Open pyjs/pyjs/pyjswidgets/pyjamas/gmaps/Polygon.py/PolygonOptions