def docstrings(code, to_double=True):
    """
	Converts between 3x' and 3x" as long as only one of them occurs in the file.
	"""
    single, double = "'''", '"""'
    if single in code and double in code:
        print('skipping docstrings because both %s and %s appear' % (single,
            double))
        return code
    if to_double:
        code = code.replace(single, double)
    else:
        code = code.replace(double, single)
    return code
