def escape(s):
    """
    A simple-minded function to escape strings for use in Gremlin queries.
    Replaces qutes with their escaped versions.  Other escaping
    may be necessary to avoid problems.
    """
    return s.replace("\'", "\\\'").replace("\"", "\\\"")