def quote_for_pydot(string):
    """
    takes a string (or int) and encloses it with "-chars. if the string
    contains "-chars itself, they will be escaped.
    """
    if isinstance(string, int):
        string = str(string)
    escaped_str = QUOTE_RE.sub(r'\\"', string)
    return u'"{}"'.format(escaped_str)
takes a string (or int) and encloses it with "-chars. if the string
    contains "-chars itself, they will be escaped.