def _is_datetime(string):
    if not isinstance(string, basestring):
        return False
    try:
        iso_string_to_datetime(string)
    except (__HOLE__, OverflowError, TypeError):
        return False
    else:
        return True
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/tzmigration/management/commands/tzmigrate.py/_is_datetime