def google_equivalent(text1, text2):
    # Google spreadsheets modify some characters, and anything that looks like
    # a date. So this function will return true if text1 would equal text2 if 
    # both were input into a google cell.
    lines1 = [l.replace('\t',' ').strip() for l in text1.splitlines()]
    lines2 = [l.replace('\t',' ').strip() for l in text2.splitlines()]
    if len(lines1) != len(lines2):
        return False
    if len(lines1) == 0 and len(lines2) == 0:
        return True
    if len(lines1) > 1:
        for a,b in zip(lines1, lines2):
            if a != b:
                return False
        # Multiline string matches on every line.
        return True
    elif lines1[0] == lines2[0]:
        # Single line string.. that matches.
        return True

    # Might be dates.
    text1 = lines1[0]
    text2 = lines2[0]
    if _is_google_fmt_date(text1) or _is_google_fmt_date(text2):
        try:
            date1 = dateutil.parser.parse(text1)
            date2 = dateutil.parser.parse(text2)
            if date1 == date2:
                return True
        except __HOLE__:
            # Couldn't parse one of the dates.
            pass
    return False
dataset/ETHPy150Open mbrenig/SheetSync/sheetsync/__init__.py/google_equivalent