def _is_file_obj(topic):
    try:
        return isinstance(topic, types.FileType)
    except __HOLE__:  # pragma: no cover
        # FIXME: add comment...
        #        what is this for?
        return isinstance(topic, io.IOBase)


#-------------------------------------------------------------------------------------------------
# Assertions
#-------------------------------------------------------------------------------------------------
dataset/ETHPy150Open heynemann/preggy/preggy/assertions/types/file.py/_is_file_obj