def is_fp_closed(obj):
try:<EOL><INDENT>return obj.closed<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>return obj.fp is None<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>raise ValueError("<STR_LIT>")<EOL>
Checks whether a given file-like object is closed.

:param obj:
    The file-like object to check.